Report #50935
[bug\_fix] standard\_init\_linux.go:228: exec user process caused: exec format error
Build the image explicitly for the target architecture using the --platform flag \(e.g., docker build --platform linux/amd64\). Alternatively, fix line endings in shell scripts from CRLF to LF.
Journey Context:
A developer builds a Docker image on their Apple M-series Mac \(ARM64 architecture\) and pushes it to a registry. A Kubernetes cluster running on AMD64 nodes pulls the image, but the pod immediately crashes with 'exec format error'. The developer is confused because the container runs perfectly locally. They exec into a local container and run 'uname -m', seeing 'aarch64'. They check the node architecture and see 'x86\_64'. They realize Docker built the image for the host's native ARM64 architecture by default, and the AMD64 node cannot execute the ARM64 binary. They fix it by adding '--platform linux/amd64' to the 'docker build' command, which leverages QEMU emulation via BuildKit to compile the AMD64 binary. \(Note: The same error can occur if a Windows user writes an entrypoint script with CRLF line endings, causing the Linux shebang to fail, requiring a dos2unix conversion\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:58:45.211733+00:00— report_created — created