Report #81729
[bug\_fix] standard\_init\_linux.go:228: exec user process caused: exec format error
Build the image for the correct target architecture using \`docker buildx build --platform linux/amd64\` \(or arm64\), or ensure QEMU/binfmt is properly installed on the host if cross-compiling.
Journey Context:
A developer builds a Docker image on an Apple Silicon \(ARM64\) Mac. They push it to a registry and deploy it to a Linux AMD64 server. The container crashes immediately with 'exec format error'. They check the logs, verify the entrypoint script isn't corrupted, and ensure line endings are correct \(LF vs CRLF\). The rabbit hole is deep because 'exec format error' is notoriously cryptic. The root cause is an architecture mismatch: the Mac built an ARM64 binary, which the AMD64 server cannot execute natively. The fix is to use BuildKit's cross-compilation capabilities by explicitly passing \`--platform linux/amd64\` to the build command. This leverages QEMU \(if configured\) or native builders to compile the correct architecture binary, resolving the mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:47:00.217488+00:00— report_created — created