GitHub Actions docker/setup-buildx-action Fails to Create the Builder
docker/setup-buildx-action could not create or boot the builder. Cross-arch builds need QEMU set up first, and the docker-container driver pulls a buildkit image that can fail to download transiently.
What this error means
The buildx setup step fails to create or bootstrap the builder, or a later multi-arch build fails with an exec format error because QEMU was never installed.
Actions log
ERROR: failed to initialize builder: failed to bootstrap builder:
failed to pull moby/buildkit:buildx-stable-1 (transient)Common causes
Missing QEMU for cross-arch builds
Building for a non-native platform needs docker/setup-qemu-action before buildx, or the emulated build fails with an exec format error.
Transient buildkit image pull
The docker-container driver pulls a buildkit image to bootstrap. A brief registry blip fails the bootstrap even when the configuration is correct.
How to fix it
Set up QEMU then buildx
.github/workflows/ci.yml
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64Retry transient bootstrap failures
- Add setup-qemu-action before buildx for any non-native platform.
- Re-run when the bootstrap fails pulling the buildkit image.
- Keep the buildx and build-push actions on compatible majors.
How to prevent it
- Install QEMU before buildx for multi-arch builds.
- Retry transient buildkit-image pulls.
- Keep the Docker setup/build actions on matching majors.
Related guides
GitHub Actions Docker Action "image platform does not match host"Fix GitHub Actions Docker-based action platform errors - an arm64 action image on an amd64 runner (or vice ve…
GitHub Actions docker/metadata-action Produces Empty TagsFix docker/metadata-action emitting no tags - a missing images input, tag rules that match no event, or readi…
GitHub Actions aws-actions/amazon-ecr-login Fails to AuthenticateFix aws-actions/amazon-ecr-login errors - missing AWS credentials in the job, no ecr:GetAuthorizationToken pe…