Docker Core

The kernel declined the binary because it was built for another architecture.

exec-format-error
MediumContainer Platform

Reviewed for reference consistency: August 11, 2026

The kernel declined the binary because it was built for another architecture.

What exec-format-error Means

The exec-format-error error on the Docker Core indicates the kernel declined the binary because it was built for another architecture.. This typically occurs due to the image has no manifest entry for the host architecture, so the wrong variant ran.

Images bundle binaries for specific CPU architectures. Running an amd64 binary on an arm64 host, typically after pulling an image without an arm64 manifest entry, reaches the exec syscall, fails with the format error, and the runtime wraps the entrypoint failure in its start error.

How to fix exec-format-error

General informational guidance, not professional advice. Commands can affect your system or data — back up first and proceed at your own risk. FixerCode is an independent reference, not affiliated with any vendor mentioned.

  1. Show which architecture the image targets

    The inspect format prints the image's recorded operating system and architecture from its build.

    docker image inspect --format '{{.Os}}/{{.Architecture}}' <image>
  2. Compare with the host's platform

    The info format prints the engine's own platform, making the mismatch against the image directly visible.

    docker info --format '{{.OSType}}/{{.Architecture}}'

Technical Background

The error originates at the exec boundary: the kernel reads the binary header, finds an architecture it cannot execute, and refuses. Everything before that point, including the pull and the filesystem assembly, succeeded.

Multi-platform publishing is the structural fix: when images ship manifest lists covering arm64 and amd64, clients resolve the matching variant automatically, and the mismatch class disappears rather than being handled case by case.

Common Causes

  • The image has no manifest entry for the host architecture, so the wrong variant ran
  • A multi-arch pull fell back to a foreign-architecture build
  • A binary placed into a scratch image targets a different CPU

Typical Scenarios

  • An arm64 laptop running a colleague's image built only for amd64
  • A CI matrix crossing x86 builders with arm runners
  • A scratch image carrying a precompiled binary of the wrong architecture

What to Know

The failure appears immediately at container start with a short-lived exit, which separates it from application crashes: no application output exists because the application never began executing.

Frequently Asked Questions

Common questions about Docker exec-format-error error

The pull can succeed regardless: it fetches whatever variant the manifest resolved, and the architecture match only surfaces when the kernel tries to execute the binary.

Installed emulators let foreign binaries run at a performance cost, which is why desktop platforms offer them as an explicit compatibility layer.

Related Error Codes

Related Errors From Other Categories

Similar error codes documented across different platforms and systems