Report #59952
[bug\_fix] exec user process caused: exec format error when running a container built on an Apple Silicon \(M1/M2/M3\) Mac on an AMD64 Linux server.
Build the image with the correct target platform using \`docker build --platform linux/amd64 ...\` or set \`DOCKER\_DEFAULT\_PLATFORM=linux/amd64\` before building.
Journey Context:
A developer builds a Docker image on their new ARM-based Mac, pushes it to a registry, and deploys it to an AWS EC2 AMD64 instance. The pod crashes with 'exec format error'. They assume the binary is corrupted or the Dockerfile is broken. They check the architecture using \`docker inspect\` locally and see \`arm64\`. They realize Docker Desktop on Apple Silicon defaults to building for the host architecture \(ARM64\), while the production server expects AMD64. The Linux kernel cannot execute ARM binaries on an AMD64 CPU without QEMU emulation. Rebuilding the image with the \`--platform linux/amd64\` flag forces cross-compilation, producing an AMD64-compatible image that runs correctly on the server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T07:07:12.576039+00:00— report_created — created