GitHub Actions docker/setup-buildx-action "failed to initialize builder"
docker/setup-buildx-action creates a buildx builder backed by a driver (docker-container by default). A missing Docker daemon, an unavailable driver, or absent QEMU for cross-platform builds stops the builder from coming up.
What this error means
A setup-buildx-action step fails creating or bootstrapping the builder, sometimes referencing the docker-container driver or a platform that needs emulation.
github-actions
ERROR: failed to initialize builder builder-xxxx (builder-xxxx0):
error during connect: Cannot connect to the Docker daemon at unix:///var/run/docker.sockCommon causes
No Docker daemon on the runner
macOS and some self-hosted runners have no Docker daemon, so the docker-container driver cannot start.
Cross-platform build without QEMU
Building for non-native platforms needs docker/setup-qemu-action first; without it the builder cannot emulate.
How to fix it
Provide a working Docker host and QEMU
- Run buildx jobs on a Linux runner with Docker available.
- Add docker/setup-qemu-action before setup-buildx for multi-arch builds.
- Keep setup-buildx-action and build-push-action versions current.
.github/workflows/ci.yml
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3How to prevent it
- Run Docker builds on Linux runners that have a daemon.
- Add QEMU setup whenever you target non-native platforms.
- Latchkey managed runners ship a ready Docker daemon and warm buildx, and auto-retry transient builder bootstrap failures.
Related guides
GitHub Actions docker/build-push-action "denied" on pushFix docker/build-push-action "ERROR: denied" - buildx could not push the image because the registry rejected…
GitHub Actions docker/login-action "Username and password required"Fix docker/login-action "Error: Username and password required" - the action got an empty username or passwor…
GitHub Actions github/codeql-action out of disk / OOMFix github/codeql-action failures from running out of disk or memory - large codebases exhaust the runner dur…