How to fix ERROR: failed to solve: failed to load builder in Docker
The 'failed to solve: failed to load builder' error occurs when Docker Buildx cannot find or initialize a valid builder instance. This typically happens due to missing or broken buildx plugin installation, misconfigured builders, or WSL/Docker Desktop integration issues.
Quick fix
Fixes ERROR: failed to solve: failed to load builder
# Check buildx version
docker buildx version
# List available builders
docker buildx ls- Check if buildx plugin is installed correctly
- Check for broken symlinks (WSL users)
- Remove broken Docker installation files
- Install or reinstall the docker-buildx-plugin
# Check buildx versiondocker buildx version# List available buildersdocker buildx lsERROR: failed to solve: failed to load builder
What this error means
The "failed to solve: failed to load builder" error in Docker Buildx indicates that the build process cannot locate or initialize the specified builder instance. Buildx is Docker's extended build capability that uses BuildKit for advanced features like multi-platform builds and improved caching. When you run a buildx command, Docker attempts to load a builder - either the default one or a named builder you've created. If the builder configuration is corrupted, the buildx plugin is missing or broken, or there are environment issues (especially common in WSL setups), this error appears. This error is particularly common after uninstalling Docker Desktop on Windows while still using Docker in WSL, as the uninstallation can leave behind broken symlinks to Docker Desktop's buildx plugin. It can also occur when the buildx binary is missing from the expected plugin locations or when attempting to use a builder that was never properly created.
Typical symptoms
- Docker buildx build commands fail with 'failed to load builder' error
- Error appears after uninstalling Docker Desktop on Windows while using WSL
- Commands like 'docker buildx ls' show empty or error output
- Multi-platform builds fail to start
- Regular 'docker build' works but 'docker buildx build' fails
- Error occurs in CI/CD pipelines using buildx for cross-platform builds
- 'docker buildx version' returns an error or is not recognized
Common causes
- Docker buildx plugin is not installed or is missing from the CLI plugins directory
- Broken symlinks to Docker Desktop's buildx after uninstalling Docker Desktop (common on WSL)
- The specified builder does not exist or was never created
- Corrupted buildx configuration in ~/.docker/buildx/
- Docker Desktop is not running (for WSL users relying on Docker Desktop integration)
- Incompatible or outdated buildx plugin version
- Missing or misconfigured BuildKit container for docker-container driver
- Permission issues accessing buildx plugin or configuration files
How to fix "ERROR: failed to solve: failed to load builder"
First, verify that the buildx plugin is properly installed and accessible:
# Check buildx version
docker buildx version
# List available builders
docker buildx lsIf these commands fail or show errors, the buildx plugin may be missing or broken.
If you previously used Docker Desktop on Windows and uninstalled it, broken symlinks may remain. Check the CLI plugins directory:
# Check for broken symlinks
ls -la /usr/local/lib/docker/cli-plugins/
# If you see broken links pointing to /mnt/wsl/docker-desktop/...
# they need to be removedIf you see symlinks pointing to non-existent Docker Desktop paths (like /mnt/wsl/docker-desktop/cli-tools/...), these need to be cleaned up.
If you found broken symlinks, remove them and reinstall the buildx plugin:
# Remove the broken symlinks/files
sudo rm -rf /usr/local/lib/docker/
# Update package lists
sudo apt updateThis clears out any corrupted Docker plugin files so you can install fresh ones.
Install the buildx plugin from your package manager:
# For Debian/Ubuntu
sudo apt install -y docker-buildx-plugin
# If on Ubuntu 22.04+, you might need:
sudo apt install -y docker-buildx
# For Fedora/RHEL
sudo dnf install -y docker-buildx-plugin
# Verify installation
docker buildx versionThe package name may vary slightly between distributions.
After installing buildx, create a new builder instance:
# Create a new builder with docker-container driver
docker buildx create --name mybuilder --driver docker-container --use
# Bootstrap the builder (downloads BuildKit image and starts container)
docker buildx inspect --bootstrap mybuilder
# Verify the builder is active
docker buildx lsThe --bootstrap flag ensures the builder is fully initialized before use.
If you're using WSL with Docker Desktop integration, make sure Docker Desktop is actually running on Windows:
1. Check the Windows system tray for the Docker Desktop icon
2. If not running, start Docker Desktop from the Start menu
3. Wait for it to fully start (the icon should stop animating)
4. Then try your buildx command again in WSL
# After starting Docker Desktop, verify connection
docker info
docker buildx lsIf the buildx configuration is corrupted, you can reset it:
# Remove all buildx builders
docker buildx rm --all-inactive
# Remove buildx config directory (creates fresh on next use)
rm -rf ~/.docker/buildx/
# Recreate the default builder
docker buildx create --name default --driver docker-container --use
docker buildx inspect --bootstrapThis gives you a clean slate for buildx configuration.
If package manager installation doesn't work, you can install buildx manually:
# Download the latest buildx binary (check GitHub for latest version)
BUILDX_VERSION=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
wget https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-amd64
# Create plugin directory and install
mkdir -p ~/.docker/cli-plugins/
mv buildx-${BUILDX_VERSION}.linux-amd64 ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx
# Verify installation
docker buildx versionAdjust the architecture in the download URL if you're on ARM (use linux-arm64).
Advanced notes
### Understanding Buildx Drivers
Docker Buildx supports multiple drivers, each with different capabilities:
- docker: Uses the built-in Docker daemon builder. Limited features but no additional setup. Doesn't support multi-platform builds.
- docker-container: Runs BuildKit in a container. Supports multi-platform builds and advanced caching. This is the recommended driver for most use cases.
- kubernetes: Runs BuildKit pods on Kubernetes. Useful for distributed builds.
- remote: Connects to a remote BuildKit daemon. For custom BuildKit deployments.
When you see "failed to load builder", it usually means the docker-container driver's container is missing or the docker driver is not properly configured.
### Multi-Platform Build Setup
For cross-platform builds (e.g., building ARM images on x86), you need QEMU emulation:
# Install QEMU for multi-platform support
docker run --privileged --rm tonistiigi/binfmt --install all
# Create a builder with multi-platform support
docker buildx create --name multiarch --driver docker-container --platform linux/amd64,linux/arm64 --use
# Build for multiple platforms
docker buildx build --platform linux/amd64,linux/arm64 -t myimage:latest .### CI/CD Considerations
In CI/CD environments (GitHub Actions, GitLab CI, etc.), you typically need to:
1. Install the buildx plugin
2. Create a builder instance in each job
3. Use caching to speed up builds
Example for GitHub Actions:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: user/app:latest### WSL-Specific Issues
After removing Docker Desktop, WSL may retain configuration pointing to Docker Desktop paths. Beyond removing symlinks, you may also need to:
# Check if Docker context is pointing to Docker Desktop
docker context ls
# If using a Docker Desktop context, switch to default
docker context use defaultIf you're running Docker natively in WSL (not via Docker Desktop), ensure the Docker daemon is running:
sudo service docker start
# Or with systemd
sudo systemctl start dockerFrequently asked questions
- What does "ERROR: failed to solve: failed to load builder" mean?
- The "failed to solve: failed to load builder" error in Docker Buildx indicates that the build process cannot locate or initialize the specified builder instance. Buildx is Docker's extended build capability that uses BuildKit for advanced features like multi-platform builds and improved caching. When you run a buildx command, Docker attempts to load a builder - either the default one or a named builder you've created.
- How do I fix "ERROR: failed to solve: failed to load builder"?
- The 'failed to solve: failed to load builder' error occurs when Docker Buildx cannot find or initialize a valid builder instance. This typically happens due to missing or broken buildx plugin installation, misconfigured builders, or WSL/Docker Desktop integration issues.
- What causes "ERROR: failed to solve: failed to load builder"?
- Docker buildx plugin is not installed or is missing from the CLI plugins directory Broken symlinks to Docker Desktop's buildx after uninstalling Docker Desktop (common on WSL) The specified builder does not exist or was never created
- Is the "ERROR: failed to solve: failed to load builder" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐Docker Official Documentation
- ๐docker buildx create - Docker Docs(Official Docs)
- ๐Manage builders - Docker Docs(Official Docs)
- ๐Builders overview - Docker Docs(Official Docs)
- ๐
- ๐ฌ
- ๐ฌdocker buildx failed to initialize builder - Stack Overflow(Stack Overflow)
- ๐
- ๐