Skip to content
Latchkey

GitHub Actions Docker Action "image platform does not match host"

A Docker container action fails because its image was built for an architecture that does not match the runner, or because Docker actions only run on Linux runners.

What this error means

The step fails during "Build/Pull container action" with a platform-mismatch warning or an exec format error, or with "Container action is only supported on Linux". The action never executes.

Actions log
WARNING: The requested image's platform (linux/arm64) does not match the
detected host platform (linux/amd64)
exec /entrypoint.sh: exec format error

Common causes

Image architecture differs from the runner

A Docker action image built only for arm64 fails on an amd64 runner (and vice versa). The platform-mismatch warning precedes an exec format error when the binary cannot run.

Docker action on a non-Linux runner

Container actions (runs.using: docker) run only on Linux runners. Scheduling one on Windows or macOS fails before the container starts.

How to fix it

Run Docker actions on a matching Linux runner

Schedule the job on a Linux runner whose architecture matches the action image.

.github/workflows/ci.yml
jobs:
  scan:
    runs-on: ubuntu-latest      # Linux required for docker actions
    steps:
      - uses: my-org/scanner-action@v1

Publish a multi-arch action image

  1. Build the action image for both linux/amd64 and linux/arm64 with buildx.
  2. Push it as a multi-arch manifest so the runner pulls the matching variant.
  3. For arm64 runners, confirm the action ships an arm64 image.

How to prevent it

  • Publish Docker action images as multi-arch manifests.
  • Keep Docker (container) actions on Linux runners.
  • Match runner architecture to the action image when using single-arch images.

Frequently asked questions

What causes "Docker action platform"?
A Docker action image built only for arm64 fails on an amd64 runner (and vice versa). The platform-mismatch warning precedes an exec format error when the binary cannot run.
How do I fix Docker action platform?
Schedule the job on a Linux runner whose architecture matches the action image.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card