Report #59344
[bug\_fix] standard\_init\_linux.go: exec user process caused: exec format error
Build the image with the correct target platform using \`docker build --platform linux/amd64 ...\` or set the environment variable \`DOCKER\_DEFAULT\_PLATFORM=linux/amd64\` before building.
Journey Context:
A developer builds a Docker image on their Apple Silicon \(M1/M2\) Mac and pushes it to a registry. When Kubernetes pulls the image on an AWS EC2 AMD64 node, the Pod crashes with \`exec format error\`. The developer tears their hair out checking file permissions and shell scripts, thinking the binary is corrupted. They eventually run \`docker inspect\` locally and notice the architecture is \`arm64\`. Docker Desktop on Apple Silicon defaults to building \`linux/arm64\` images, but the EC2 node requires \`linux/amd64\`. The fix works because explicitly setting the platform flag forces BuildKit to emulate or cross-compile for the target architecture, producing a compatible binary for the deployment environment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:06:07.929533+00:00— report_created — created