From 0e7531b8981a290aa8a57caab1d8ee358068a3a4 Mon Sep 17 00:00:00 2001 From: Joshua Barnett Date: Thu, 21 Aug 2025 00:26:33 +0100 Subject: [PATCH] fix missing manifest when performing multi-platform build and push --- src/spec-node/devContainersSpecCLI.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/spec-node/devContainersSpecCLI.ts b/src/spec-node/devContainersSpecCLI.ts index 59136695d..3cf078a98 100644 --- a/src/spec-node/devContainersSpecCLI.ts +++ b/src/spec-node/devContainersSpecCLI.ts @@ -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.