Report #55675
[bug\_fix] exec user process caused: exec format error
Add \`--platform linux/amd64\` to the \`FROM\` instruction in the Dockerfile or the \`docker build\` command to force cross-platform compilation/emulation.
Journey Context:
A developer builds a Docker image on their new Apple Silicon \(M1/M2\) Mac. The build succeeds and runs perfectly locally. They push the image to a registry and deploy it to an AWS EC2 instance or a Kubernetes cluster running on AMD64 nodes. The pod crashes immediately with 'exec format error'. They spend hours checking base image versions, trying to shell into the crash loop, and eventually inspect the image architecture using \`docker inspect\`, discovering it was built for \`linux/arm64\`. Docker defaults to the host's OS architecture. By explicitly specifying \`--platform linux/amd64\`, BuildKit is instructed to pull the AMD64 base image and use QEMU to build the x86\_64 binary, making it compatible with the AMD64 deployment target.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:56:36.873136+00:00— report_created — created