Cloud Run: exec format error — image built for the wrong CPU architecture (arm64 vs amd64)
The container crashes immediately because the binary was built for ARM but Cloud Run runs amd64 (or vice versa).
exec format errorstandard_init_linux.go: exec user process caused: exec format errorexec /usr/local/bin/app: exec format errorexec user process caused "exec format error"image platform linux/arm64 does not match Meaning
Building on an Apple Silicon Mac produces arm64 images. Build for the target platform: docker buildx build --platform linux/amd64 ... or gcloud builds submit, which builds amd64 by default.
Common causes
- Image built on an M1/M2/M3 Mac without --platform
- Multi-arch image missing the amd64 variant
- Base image tag for another architecture
- Prebuilt binary for the wrong arch
- CI runner architecture mismatch
⚡ Quick fix
docker buildx build --platform linux/amd64 -t IMAGE --push .- Use Cloud Build for deployment builds
- Check with
docker inspect IMAGE --format '{{.Architecture}}'
Detailed fix by platform
Shell
docker buildx build --platform linux/amd64 -t REGION-docker.pkg.dev/PROJECT/repo/app:1 --push .
How to diagnose
- Image arch — amd64?
- Built on — Apple Silicon?
- Platform flag — Used?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Artifact Registry: Permission artifactregistry.repositories.uploadArtifacts denied Docker push: denied: Permission "artifactregistry.repositories.uploadArtifacts" denied on resource "projects/p/locations/l/repositories/r"
- Cloud Build: step exited with non-zero status Cloud Build: ERROR: build step 2 "gcr.io/cloud-builders/npm" failed: step exited with non-zero status: 1
- Cloud Run 403: Your client does not have permission to get URL Cloud Run: Error: Forbidden — Your client does not have permission to get URL / from this server
Most viewed in Google Cloud / Firebase
- Missing or insufficient permissions Firestore: FirebaseError: [code=permission-denied]: Missing or insufficient permissions
- Container failed to start Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable
- 409: The resource already exists Compute Engine: ERROR: (gcloud.compute.instances.create) Could not fetch resource: The resource 'projects/p/zones/z/instances/vm-1' already exists
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026