docker build ai_generated true

docker: 'buildx' is not a docker command

ID: docker/docker-buildx-missing

Also available as: JSON · Markdown
93%Fix Rate
95%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
27 active

Root Cause

Docker Buildx plugin is not installed or not in the CLI plugin path. Buildx is required for multi-platform builds, BuildKit features, and the newer docker build syntax.

generic

Workarounds

  1. 95% success Install the Docker Buildx plugin
    sudo apt-get install docker-buildx-plugin (Debian/Ubuntu) or download from https://github.com/docker/buildx/releases and place in ~/.docker/cli-plugins/docker-buildx

    Sources: https://docs.docker.com/build/install-buildx/

  2. 92% success Install Docker Desktop which includes Buildx by default
    Download and install Docker Desktop from https://docs.docker.com/desktop/ — includes buildx, compose, and other plugins

    Sources: https://docs.docker.com/desktop/

Dead Ends

Common approaches that don't work:

  1. Symlinking buildx binary to a random path 80% fail

    Docker CLI plugins must be in ~/.docker/cli-plugins/ or /usr/libexec/docker/cli-plugins/; other paths are not scanned

  2. Using DOCKER_BUILDKIT=1 docker build as a replacement 60% fail

    DOCKER_BUILDKIT=1 enables BuildKit but does not provide buildx features like multi-platform builds, custom builders, and build caching backends

Error Chain

Leads to:
Preceded by:
Frequently confused with: