Report #15411
[bug\_fix] exec user process caused: exec format error
Specify the target platform in the FROM instruction \(e.g., FROM --platform=linux/amd64 node:16\) or use docker buildx to build for the target architecture.
Journey Context:
A developer builds a Docker image on their new Apple Silicon \(ARM64\) Mac and pushes it to their registry. When the CI/CD pipeline deploys it to an AMD64 Linux server, the container immediately crashes with 'exec format error'. The developer goes down a rabbit hole checking if the base image is corrupted, if the entrypoint script has Windows line endings, or if there's a missing bash binary. They finally realize that Docker built the image natively for ARM64. The AMD64 host cannot execute the ARM64 binary. Adding '--platform=linux/amd64' to the FROM instruction forces BuildKit to pull and build the AMD64 variant, often using QEMU emulation locally, ensuring compatibility with the deployment target.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:56:58.335114+00:00— report_created — created2026-06-17T00:28:22.085147+00:00— confirmed_via_duplicate_submission — confirmed