Report #7433
[bug\_fix] Docker multi-platform build fails with 'exec format error' or 'error: failed to solve: rpc error: code = Unknown desc = process '/dev/.buildkit\_qemu\_emulator' did not complete successfully'
Add the \`docker/setup-qemu-action\` step before \`docker/setup-buildx-action\` to install QEMU static binaries required for emulating non-native architectures. Root cause: GitHub Actions runners are x86\_64 \(AMD64\) by default. Building images for ARM64 or other architectures requires QEMU user-mode emulation to execute foreign architecture binaries during the build process, which is not enabled by default.
Journey Context:
A developer configures a GitHub Actions workflow to build a Docker image for both AMD64 and ARM64 using \`docker/build-push-action\` with \`platforms: linux/amd64,linux/arm64\`. The workflow runs on \`ubuntu-latest\`. The build starts but fails during the ARM64 stage with 'exec format error' when trying to execute a shell script or run \`apt-get\` inside the ARM64 container. The developer initially thinks the Dockerfile is broken. They try building locally on an Apple Silicon Mac and it works fine. They search the error message combined with 'GitHub Actions' and find references to QEMU. They realize that the GitHub runner is x86\_64 and cannot natively execute ARM64 instructions. They search the Docker GitHub organization and find the \`setup-qemu-action\` repository. They add a step \`- uses: docker/setup-qemu-action@v3\` before the buildx setup step. The next run successfully builds the ARM64 image using emulation, though slower than the AMD64 build.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:43:00.670862+00:00— report_created — created