Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/spec-node/devContainersSpecCLI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,17 @@ async function doBuild({
// Support multiple use of `--label`
params.additionalLabels = (buildxLabel && (Array.isArray(buildxLabel) ? buildxLabel : [buildxLabel]) as string[]) || [];

// Detect multiple platforms for buildx
const platforms = buildxPlatform ? (Array.isArray(buildxPlatform) ? buildxPlatform : String(buildxPlatform).split(',').map(p => p.trim())) : [];
if (platforms.length > 1) {
// For multi-platform builds, force --push and unset --load
params.buildxPush = true;
if (params.buildxOutput === 'load' || params.buildxOutput === '--load') {
params.buildxOutput = undefined;
output && output.write('Warning: --load is not supported for multi-platform builds. Using --push instead.\n');
}
}

if (isDockerFileConfig(config)) {

// Build the base image and extend with features etc.
Expand Down