TraceResolveSRE Platform
MCP ServerAdmin
Back to CatalogDocker / Linux

Docker: exec /usr/local/bin/docker-entrypoint.sh: exec format error

standard_init_linux.go:228: exec user process caused: exec format error
Immediate Remediation
bash
# Build image targeting the host server architecture (e.g. AMD64 vs ARM64 Apple Silicon):
docker buildx build --platform linux/amd64 -t my-app:latest --load .

# Or in docker-compose.yml:
# services:
#   app:
#     platform: linux/amd64
Root Cause Analysis

The binary or container image was compiled for a different CPU architecture (e.g. ARM64 on Apple M-series Macs) and cannot execute on an x86_64/AMD64 host.

Verification & Guardrails

  • Always specify --platform linux/amd64 when building images on macOS for deployment to AWS, GCP, or DigitalOcean.
  • Ensure the shebang line (#!/bin/sh) does not contain Windows CRLF carriage returns.

Have a custom or uncategorized crash?

Run your trace through our in-memory client privacy sandbox for instant SRE remediation.

Open Diagnostic Studio