Skip to content
Latchkey

Docker "BuildKit is enabled but the buildx component is missing" in CI

When DOCKER_BUILDKIT=1 is set, docker build delegates to the buildx CLI plugin. If that plugin binary is absent or unreadable, Docker reports that BuildKit is enabled but the buildx component is missing or broken, and the build cannot proceed.

What this error means

A docker build fails immediately with BuildKit is enabled but the buildx component is missing or broken, even though the daemon is healthy.

docker
ERROR: BuildKit is enabled but the buildx component is missing or broken.
       Install the buildx component to build images with BuildKit:
       https://docs.docker.com/go/buildx/

Common causes

The buildx CLI plugin is not installed

A minimal Docker install or a custom CI image may ship the daemon and docker CLI but not the buildx plugin.

The plugin is in a directory Docker does not scan

A buildx binary placed outside ~/.docker/cli-plugins (or the system plugins dir) is not discovered.

How to fix it

Install the buildx plugin

  1. On a GitHub Actions runner, set up buildx with the official action.
  2. Or install the plugin binary into the cli-plugins directory.
workflow
- uses: docker/setup-buildx-action@v3
- run: docker buildx build -t myorg/app:ci .

Place the binary where Docker looks for plugins

  1. Download the buildx release binary.
  2. Install it as docker-buildx under the cli-plugins directory.
Terminal
mkdir -p ~/.docker/cli-plugins
curl -fsSL -o ~/.docker/cli-plugins/docker-buildx \
  https://github.com/docker/buildx/releases/latest/download/buildx-linux-amd64
chmod +x ~/.docker/cli-plugins/docker-buildx
docker buildx version

How to prevent it

  • Use docker/setup-buildx-action in CI to guarantee the plugin is present.
  • Bake buildx into custom runner images rather than relying on a minimal Docker install.

Related guides

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