Report #8966
[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 specify \`FROM --platform=linux/amd64\` in the Dockerfile.
Journey Context:
A developer builds a Docker image on their Apple Silicon \(M1/M2\) Mac. It builds and runs perfectly locally. They push the image to a registry and deploy it to a cloud provider running on x86\_64 Linux. The container crashes immediately with 'exec format error'. They suspect a corrupted binary or a broken base image. They inspect the image locally and notice the architecture is \`arm64\`. They realize Docker Desktop defaults to building images matching the host OS architecture \(ARM64\), which cannot execute on an AMD64 host without emulation. They fix it by explicitly adding \`--platform linux/amd64\` to the \`docker build\` command, ensuring the resulting image contains x86\_64 binaries compatible with the cloud server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:53:25.060696+00:00— report_created — created