exec: "standard_init_linux.go: exec format error"
TL;DRThis Docker runtime error means the container tried to start an executable built for a different processor architecture than the one running on your machine (for example, an ARM binary on an x86 system).
Most likely cause: Docker image or binary compiled for the wrong CPU architecture
Try first: Check the image architecture (docker inspect --format='{{.Architecture}}' your-image-name)
Likely causes
- Docker image or binary compiled for the wrong CPU architecturemost likely
- Base image in Dockerfile does not match the host platformpossible
- Corrupted or incomplete image buildless likely
How to fix it
Safest first: SafeChanges settingsDangerous
Check the image architectureSafe
Run a read-only command to see what architecture the image was built for and compare it to your host.
docker inspect --format='{{.Architecture}}' your-image-nameRebuild the image for the correct platformChanges settings
Add the platform flag when building so the image matches your machine.
docker build --platform linux/amd64 -t your-image-name .Run the container with explicit platformChanges settings
Force Docker to use the matching architecture at runtime if the image supports it.
docker run --platform linux/amd64 your-image-name
If that didn't fix it
Inspect the Dockerfile and any multi-stage build steps to confirm the final binary is compiled for the same architecture as the base image you are using.
When to see a technician
Contact a developer or DevOps engineer if you are not familiar with editing Dockerfiles or rebuilding container images.
Quick answers
- What does exec: "standard_init_linux.go: exec format error" mean?
- This Docker runtime error means the container tried to start an executable built for a different processor architecture than the one running on your machine (for example, an ARM binary on an x86 system).
- What causes exec: "standard_init_linux.go: exec format error"?
- Docker image or binary compiled for the wrong CPU architecture. (most likely) Base image in Dockerfile does not match the host platform. (possible) Corrupted or incomplete image build. (less likely)
- How do I fix exec: "standard_init_linux.go: exec format error"?
- Try these in order, safest first: 1. Check the image architecture. 2. Rebuild the image for the correct platform. 3. Run the container with explicit platform.
- What if that didn't fix it?
- Inspect the Dockerfile and any multi-stage build steps to confirm the final binary is compiled for the same architecture as the base image you are using.
- When should I see a technician?
- Contact a developer or DevOps engineer if you are not familiar with editing Dockerfiles or rebuilding container images.
Related errors
codeERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)codepermission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sockcodeError: Hydration failed because the initial UI does not match what was rendered on the servercodeValueError: invalid literal for int() with base 10: ''codeIndexError: list index out of rangecodeModule not found: Can't resolve './App' in '/src'