docker buildx create and use Command Reference
Create and select a BuildKit builder instance.
docker buildx create provisions a new builder. The default builder uses the limited docker driver; multi-arch builds and external cache backends require the docker-container driver, which create sets up. docker buildx use selects which builder subsequent build commands target.
Common flags
--name- name the builder instance--driver- builder driver, e.g. docker-container (needed for multi-arch and gha cache)--use- immediately switch to the new builder after creating it--bootstrap- start the builder right away instead of lazily on first build--platform- declare the platforms this builder supports
Example
shell
docker buildx create --name ci-builder --driver docker-container --use
docker buildx inspect --bootstrap
docker buildx use ci-builderIn CI
Most workflows use the docker/setup-buildx-action which runs create/use for you, but doing it explicitly is useful in custom scripts. The docker-container driver is mandatory for --platform multi-arch and for type=gha cache; the default docker driver silently ignores those features.
Key takeaways
- The docker-container driver is required for multi-arch and external cache; the default docker driver is not enough.
- --use makes the new builder the active one for later build commands.
- buildx inspect --bootstrap warms the builder before the first build.
Related guides
docker buildx build Command ReferenceReference for docker buildx build in CI: --push, --cache-from, --cache-to type=gha, and multi-arch --platform…
docker context Command ReferenceReference for docker context in CI: create, list, and switch Docker endpoints to target a remote daemon over…
docker build Command ReferenceReference for docker build in CI: tag, file, build-arg, target, platform, no-cache, and pull flags for buildi…