Report #10717
[bug\_fix] standard\_init\_linux.go:228: exec user process caused: exec format error
Build the image for the correct target architecture using the --platform flag \(e.g., docker build --platform linux/amd64\), or ensure the entrypoint script has a valid shebang \(\#\!/bin/sh\) with Unix-style line endings \(LF\).
Journey Context:
A developer builds a Docker image natively on an Apple Silicon \(ARM64\) Mac and pushes it to a registry. A CI/CD pipeline running on an AMD64 Linux worker pulls the image and attempts to run it, resulting in an 'exec format error'. The developer goes down a rabbit hole thinking the binary is corrupted or the Alpine version is broken. They eventually realize the container was built for ARM64, and the AMD64 host cannot execute the binary. Alternatively, on Windows, a developer creates an entrypoint.sh script with CRLF line endings, and Linux fails to parse the \#\!/bin/sh shebang, yielding the exact same error. Both stem from the kernel failing to recognize the executable format.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:24:10.902243+00:00— report_created — created