Dockerexit code > 0

exec format error

$standard_init_linux.go:211: exec user process caused "exec format error"

Analysis

The container image's architecture (e.g., ARM64) does not match the host machine's architecture (e.g., AMD64).

Common Triggers

  • Running a Raspberry Pi image on an Intel Mac.
  • Running an M1 Mac image on a Linux server.

Debug Checks

  • $Check the image architecture with docker inspect <image_id> | grep Architecture.

Resolution

1
Rebuild the image for the target architecture.
2
Use multi-arch builds with docker buildx.
3
Pull the correct architecture version of the image.