Report #48225
[bug\_fix] exec user process caused: exec format error
Build the image with the correct target platform using the \`--platform\` flag, e.g., \`docker build --platform linux/amd64 ...\`, or add \`--platform=linux/amd64\` to the \`FROM\` instruction in the Dockerfile.
Journey Context:
A developer builds a Docker image on their Apple Silicon \(M1/M2\) Mac. It builds successfully and runs fine locally. They push it to a container 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 debugging: checking if the shell scripts have Windows CRLF line endings, verifying file permissions, and wondering if the binary was corrupted during the push. The root cause is that Docker Desktop on ARM defaults to building ARM64 images. The AMD64 host cannot execute the ARM64 binary. Specifying the target platform explicitly forces Docker to emulate the AMD64 architecture during the build, producing a compatible binary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:25:52.663097+00:00— report_created — created