Report #1301
[bug\_fix] exec user process caused: exec format error
Build the image with the correct target architecture using the \`--platform\` flag \(e.g., \`docker build --platform linux/amd64\`\), or use \`docker buildx\` to create a multi-architecture image.
Journey Context:
A developer working on an Apple Silicon \(M1/M2\) Mac builds a Docker image and pushes it to a registry. When the CI/CD pipeline deploys this image to an AMD64 Linux server, the container immediately crashes with 'exec format error'. The developer initially suspects a corrupted binary, a faulty base image, or a shell syntax error in the entrypoint script. After extensive debugging, they run \`uname -m\` inside a local container and realize it reports 'aarch64' \(ARM64\). The default behavior of Docker on Apple Silicon is to build ARM64 images. The production server expects an AMD64 binary. By explicitly passing \`--platform linux/amd64\` during the build, Docker emulates the target architecture via QEMU, producing a compatible image that runs flawlessly on the server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T15:40:48.673524+00:00— report_created — created