This error occurs when attempting to build multi-platform Docker images using the default docker driver, which does not support multi-architecture builds. The solution is to create a new builder that uses the docker-container driver.
When you use `docker buildx build` with the `--platform` flag to target multiple architectures (like `linux/amd64,linux/arm64`), Docker needs a builder that supports multi-platform image creation. The default `docker` driver, which is built into the Docker daemon, only supports single-platform builds. The default docker driver has several limitations: - Cannot build for multiple platforms in a single command - Limited cache export capabilities - Cannot customize BuildKit version or configuration - Only supports local, tarball, and image exporters To build multi-platform images, you need to switch to the `docker-container` driver, which runs BuildKit in a dedicated container with full multi-platform support. This driver can use QEMU for cross-architecture emulation and supports all export formats. This error commonly appears when developers try to create images that run on both x86_64 (amd64) and ARM64 systems, such as when targeting both Intel/AMD machines and Apple Silicon Macs or AWS Graviton instances.
Create a new buildx builder that uses the docker-container driver, which supports multi-platform builds:
docker buildx create --name multiplatform-builder --driver docker-container --bootstrap --useThis command:
- Creates a new builder named multiplatform-builder
- Uses the docker-container driver (runs BuildKit in a container)
- --bootstrap starts the builder immediately
- --use sets it as the current builder
You should see output indicating the builder was created and started.
Confirm your new builder is set up and running:
docker buildx inspect --bootstrapLook for output showing:
- Driver: docker-container
- Status: running
- Platforms: multiple platforms listed (linux/amd64, linux/arm64, etc.)
You can also list all builders:
docker buildx lsThe active builder will have an asterisk (*) next to its name.
Now you can build for multiple platforms. Note that multi-platform images must be pushed to a registry (you cannot load them into your local Docker image store):
docker buildx build --platform linux/amd64,linux/arm64 -t yourusername/yourimage:tag --push .If you want to load a single-platform image locally instead:
docker buildx build --platform linux/amd64 -t yourimage:tag --load .The --push flag is required for multi-platform builds because Docker's local image store doesn't support multi-architecture manifest lists.
If you're building for a platform different from your host (e.g., ARM on x86_64), you may need QEMU user-space emulation:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yesThis registers QEMU binary handlers with the kernel, enabling your system to run binaries for other architectures. After running this, restart your builder:
docker buildx rm multiplatform-builder
docker buildx create --name multiplatform-builder --driver docker-container --bootstrap --useDocker Desktop users typically have QEMU already configured.
If you're using Docker Desktop, you can alternatively enable the containerd image store, which adds multi-platform support to the default driver:
1. Open Docker Desktop
2. Go to Settings (gear icon)
3. Navigate to Features in development (or General in newer versions)
4. Enable "Use containerd for pulling and storing images"
5. Click Apply & Restart
After enabling, you may be able to use multi-platform builds with the default driver. However, creating a dedicated docker-container builder is still recommended for more flexibility and consistent behavior across environments.
### Understanding Build Drivers
Docker buildx supports several drivers:
| Driver | Multi-platform | Cache Export | Use Case |
|--------|---------------|--------------|----------|
| docker | No | Limited | Simple local builds |
| docker-container | Yes | Full | Multi-platform, CI/CD |
| kubernetes | Yes | Full | Kubernetes clusters |
| remote | Yes | Full | Remote BuildKit instances |
### Best Practices for CI/CD
In CI/CD pipelines, always create the builder explicitly rather than relying on defaults:
# GitHub Actions example
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: user/app:latest### Build Caching with docker-container
The docker-container driver supports advanced caching options:
docker buildx build \
--platform linux/amd64,linux/arm64 \
--cache-from type=registry,ref=myregistry/myimage:cache \
--cache-to type=registry,ref=myregistry/myimage:cache,mode=max \
--push \
-t myregistry/myimage:latest .### Multiple Native Nodes for Better Performance
For production builds, using native nodes for each architecture is faster than QEMU emulation:
docker buildx create --name mybuilder --node amd64-node --platform linux/amd64 \
--driver docker-container
docker buildx create --append --name mybuilder --node arm64-node --platform linux/arm64 \
DOCKER_HOST=ssh://arm64-server### Troubleshooting Builder Issues
If your builder stops working or gets into a bad state:
# Remove and recreate the builder
docker buildx rm multiplatform-builder
docker buildx create --name multiplatform-builder --driver docker-container --bootstrap --use
# Or prune all builders
docker buildx prune -a### Base Image Compatibility
Ensure your base image supports all target platforms. Check with:
docker manifest inspect --verbose alpine:latest | jq '.[].Platform'If your base image doesn't support a platform, the build will fail at the FROM instruction.
image operating system "linux" cannot be used on this platform
How to fix 'image operating system linux cannot be used on this platform' in Docker
manifest unknown: manifest unknown
How to fix 'manifest unknown' in Docker
cannot open '/etc/passwd': Permission denied
How to fix 'cannot open: Permission denied' in Docker
Error response from daemon: failed to create the ipvlan port
How to fix 'failed to create the ipvlan port' in Docker
toomanyrequests: Rate exceeded for anonymous users
How to fix 'Rate exceeded for anonymous users' in Docker Hub