docker/setup-qemu-action
Install QEMU emulators so a workflow can build container images for other CPU architectures.
What it does
docker/setup-qemu-action installs QEMU so the runner can emulate non-native architectures during a Buildx build, which is how you produce arm64 images on an amd64 runner.
Add it before docker/setup-buildx-action when building multiple platforms.
Usage
steps:
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
tags: myorg/app:multiInputs
| Input | Description | Default | Required |
|---|---|---|---|
platforms | Platforms to install emulators for. | all | No |
image | QEMU static binaries image to use. | tonistiigi/binfmt | No |
Outputs
| Output | Description |
|---|---|
platforms | Platforms now available for emulation. |
Notes
Emulated builds are much slower than native. For heavy arm64 builds, consider native arm runners instead of QEMU.
Common errors
exec format errorduring a multi-arch build means QEMU is not set up. Add setup-qemu-action before the build.
Security and pinning
- Pin both this action and the
imageto fixed versions/SHAs.