Report #84998
[bug\_fix] exec user process caused: exec format error
Use 'docker buildx build --platform linux/amd64' \(or the appropriate target architecture\) to explicitly build the image for the host architecture where the container will run.
Journey Context:
A developer builds a Docker image on their new Apple Silicon \(M1/M2\) Mac and pushes it to a registry. When their CI pipeline running on an Intel machine pulls the image and tries to run it, the container immediately exits with 'exec user process caused: exec format error'. The developer initially suspects corrupted shell scripts or Windows line endings causing issues with the entrypoint script, spending hours checking dos2unix and file encodings. Eventually, they run 'docker inspect' on the image and notice the architecture is 'arm64'. The root cause is that Docker on Apple Silicon defaults to building ARM64 images, while the Intel CI runner expects AMD64. The fix is to use buildx to explicitly build for the target architecture, utilizing QEMU emulation during the build process.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:15:13.680729+00:00— report_created — created