Skip to content
Latchkey

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 solve

Common 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

  1. Insert a docker/setup-buildx-action step before the build.
  2. Optionally add setup-qemu for multi-arch.
  3. 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 }}:latest

How 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →