Report #7334
[bug\_fix] standard\_init\_linux.go:228: exec user process caused: exec format error
Build the image with the correct target architecture using \`docker build --platform linux/amd64 ...\` or set \`FROM --platform=linux/amd64\` in the Dockerfile.
Journey Context:
A developer working on an Apple Silicon \(M1/M2/M3\) Mac builds a Docker image for their Node.js application. It builds successfully and runs locally without issues. They push the image to a registry and deploy it to an AWS EC2 instance running standard x86\_64 Linux. The container immediately crashes with 'exec format error'. The developer dives into application logs, suspects corrupted node\_modules, and tries rebuilding the app locally, but the issue persists. They eventually realize that Docker Desktop on Apple Silicon defaults to building \`linux/arm64\` images, while the EC2 instance expects \`linux/amd64\`. The fix works because explicitly setting the \`--platform\` flag forces BuildKit to use QEMU/binfmt emulation to compile and package the binary for the x86\_64 architecture, making it compatible with the target server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:29:24.361910+00:00— report_created — created