Docker "standard_init_linux.go: exec format error" in CI
runc could not exec the user process. The classic causes are an image built for a different CPU architecture, or an entrypoint script with no shebang so the kernel cannot tell how to run it.
What this error means
A container start fails with standard_init_linux.go:... exec user process caused: exec format error, often immediately after launch.
docker
standard_init_linux.go:228: exec user process caused: exec format errorCommon causes
Architecture mismatch
An arm64 image run on amd64 (or vice versa) without emulation cannot execute its binaries.
Script missing a shebang
An entrypoint script set as ENTRYPOINT without a #!/bin/sh line has no interpreter, so exec fails.
Windows line endings on the script
CRLF line endings corrupt the shebang line, making the interpreter unresolvable.
How to fix it
Fix the script
- Add a shebang as the first line and use LF line endings.
- Mark the script executable.
entrypoint.sh
#!/bin/sh
set -e
exec "$@"Match or emulate the architecture
- Build/run for the host architecture, or set up QEMU for cross-arch.
.github/workflows/build.yml
- uses: docker/setup-qemu-action@v3How to prevent it
- Keep entrypoint scripts LF-terminated with a shebang and executable bit, and match image architecture to the host (or set up QEMU). This is deterministic, not transient.
Related guides
Docker "exec format error" from wrong architecture in CIFix the Docker "exec format error" in CI builds and runs, caused by running an image built for a different CP…
Docker "OCI runtime create failed" in CIFix the Docker "OCI runtime create failed: starting container process caused" error in CI, usually a missing…
Docker buildx "no builder instance" in CIFix the Docker buildx "ERROR: no builder ... found" / "no builder instance" error in CI when a buildx command…