Docker · tool · fg-0263

Image built on an Apple Silicon Mac crashes with 'exec format error' on an amd64 server

If you see exec /usr/local/bin/docker-entrypoint.sh: exec format error, the cause and the fix for Docker are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
exec /usr/local/bin/docker-entrypoint.sh: exec format errorThe requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requestedno matching manifest for linux/arm64/v8 in the manifest list entries
Cause
docker build targets the build machine's architecture unless told otherwise, so an M-series Mac produces linux/arm64 images. The reverse happens when an image publishes only amd64 and you pull it on the Mac without a platform.
Fix
Set the target platform explicitly when building images for servers, and set platform in Compose for images that only ship amd64 so Desktop runs them under emulation.
Apply
docker buildx build --platform linux/amd64 -t "$IMAGE" --push . # compose services: app: platform: linux/amd64
Affected
Docker Desktop on Apple Silicon (M1 and later); Rosetta emulation on by default since Desktop 4.25 on macOS 14.1 and later
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun