Report #17117
[bug\_fix] exec user process caused: exec format error
Build the image with the correct target platform using --platform linux/amd64 in the FROM instruction or during the docker build command.
Journey Context:
A developer builds a Docker image natively on their Apple Silicon \(M1/M2\) Mac, which uses the ARM64 architecture. The build succeeds and runs perfectly locally because Docker Desktop seamlessly uses QEMU emulation. They push the image to a registry and deploy it to an AWS EC2 instance or a Kubernetes cluster running standard AMD64 Linux. The pod crashes immediately with 'exec format error'. The developer shells into the host and tries running the binary manually, hitting the same wall. They inspect the image and realize it was compiled for ARM64, but the target server only runs AMD64. The fix is to explicitly add --platform linux/amd64 to the FROM statement in the Dockerfile \(or the docker build command\) to force cross-compilation, ensuring the resulting binary matches the deployment target's architecture.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:26:26.690192+00:00— report_created — created