docker/build-push-action "failed to solve" - Buildx not set up
build-push-action drives a buildx builder. Without a prior docker/setup-buildx-action step there is no buildkit instance to solve the build graph, so the build fails.
What this error means
The build-push step fails with "failed to solve" or complains the buildx builder is missing.
github-actions
ERROR: failed to solve: failed to read dockerfile: buildx builder not initialized
##[error]buildx call failed with: ERROR: failed to solveCommon causes
Missing setup-buildx step
No docker/setup-buildx-action ran, so build-push has no builder to use.
Builder failed to initialize
setup-buildx ran but the driver could not start, leaving no usable builder.
How to fix it
Add setup-buildx before build-push
- Insert a docker/setup-buildx-action step before the build.
- Optionally add setup-qemu for multi-arch.
- Re-run; build-push uses the initialized builder.
.github/workflows/docker.yml
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
push: true
tags: ghcr.io/${{ github.repository }}:latestHow to prevent it
- Always run setup-buildx-action before build-push-action.
- Check the builder startup logs when the solve step fails immediately.
Related guides
docker/build-push-action "tag is needed when pushing to registry" (tags empty)Fix docker/build-push-action failing because the tags input is empty while push is true.
GitHub Actions docker/setup-buildx-action "failed to initialize builder"Fix docker/setup-buildx-action "failed to initialize builder" - buildx could not create the builder instance,…
GitHub Actions docker/setup-buildx-action Fails to Create the BuilderFix docker/setup-buildx-action failing to bootstrap a builder - a missing QEMU step for cross-arch, an unavai…