DOCKER-BUILDX-CREATE(1)
π docker-buildx-create β the manual, but make it slay π
okay bestie, welcome to DOCKER-BUILDX-CREATE(1), the page that teaches you how to spawn a whole new builder instance like it's nothing. no cap, this one's a banger. π¦
β¨ NAME β¨
docker-buildx-create β create a new builder instance. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
docker buildx create [OPTIONS] [CONTEXT|ENDPOINT]
π DESCRIPTION π
so Create does exactly what it says on the tin: it makes a new builder instance that points at a Docker context or endpoint. and when we say context, we mean the name of a context β the kind you'd see in docker context ls. and when we say endpoint, we mean the address of a Docker socket, like, the DOCKER_HOST value. iykyk. π«Ά
by default? the current Docker configuration is what gets used to figure out the context/endpoint value. so if you don't say anything, it just... knows. iconic.
now the important part: builder instances are isolated environments where builds can be invoked. little build bubbles. π«§ and heads up β all Docker contexts also get the default builder instance. everyone gets one, it's a party. π
β¨ OPTIONS β¨
--append[=false]β append a node to a builder instead of changing it. adding, not editing. π--bootstrap[=false]β boot the builder right after creation. wake it up immediately, no waiting around.--buildkitd-config=""β BuildKit daemon config file.--buildkitd-flags=""β BuildKit daemon flags.--driver=""β driver to use. the available ones are:"docker-container","kubernetes","remote".--driver-opt=[]β options for the driver.-h,--help[=false]β help forcreate.--leave[=false]β remove a node from builder instead of changing it. bye bye node. π--name=""β builder instance name.--node=""β create/modify node with given name.--platform=[]β fixed platforms for current node.--use[=false]β set the current builder instance.
π¦ EXAMPLE π¦
π« Append a new node to an existing builder (--append) {#append}
the --append flag changes the action of the command so it appends a new node to an existing builder β the one you point at with --name. then Buildx will choose an appropriate node for a build based on the platforms it supports. matching energy, basically. β¨
$ docker buildx create mycontext1
eager_beaver
$ docker buildx create --name eager_beaver --append mycontext2
eager_beaver
π« Specify a configuration file for the BuildKit daemon (--buildkitd-config) {#buildkitd-config}
--buildkitd-config FILE
this one specifies the configuration file for the BuildKit daemon to use. and psst β the configuration can be overridden by β¨#buildkitd-flagsβ©. π there's an example BuildKit daemon configuration file over here β¨https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.mdβ© if you wanna peek.
if you don't specify a configuration file, Buildx goes looking for one by default in:
$BUILDX_CONFIG/buildkitd.default.toml$DOCKER_CONFIG/buildx/buildkitd.default.toml~/.docker/buildx/buildkitd.default.toml
also real talk: if you create a docker-container builder and you've specified certificates for registries in the buildkitd.toml configuration, those files will be copied into the container under /etc/buildkit/certs and the configuration will be updated to reflect that. the whole thing. π
π« Specify options for the BuildKit daemon (--buildkitd-flags) {#buildkitd-flags}
--buildkitd-flags FLAGS
this adds flags when starting the BuildKit daemon. they take precedence over the configuration file specified by β¨#buildkitd-configβ© β so flags win, periodt. for the available flags, go check buildkitd --help.
--buildkitd-flags '--debug --debugaddr 0.0.0.0:6666'
π« BuildKit daemon network mode
you can specify the network mode for the BuildKit daemon either with the configuration file specified by β¨#buildkitd-configβ© using the worker.oci.networkMode option, or with the --oci-worker-net flag right here. the default value is auto, and it can be one of bridge, cni, host:
--buildkitd-flags '--oci-worker-net bridge'
Note π Network mode "bridge" is supported since BuildKit v0.13 and will become the default in next v0.14. so like, get ready.
π« Set the builder driver to use (--driver) {#driver}
--driver DRIVER
sets the builder driver to be used. a driver is a configuration of a BuildKit backend. Buildx supports the following drivers:
docker(default)docker-containerkubernetesremote
for more info about build drivers, see here β¨/build/drivers/β©. π
π docker driver
uses the builder that's built into the Docker daemon. with this driver, the β¨/reference/cli/docker/buildx/build/#loadβ© flag is implied by default on buildx build. however β building multi-platform images or exporting cache is not currently supported. so no, not that. π
π docker-container driver
uses a BuildKit container that will be spawned via Docker. with this driver, both building multi-platform images and exporting cache are supported. slay.
unlike the docker driver, built images will not automatically appear in docker images, and β¨/reference/cli/docker/buildx/build/#loadβ© needs to be used to achieve that. just so you know. π
π kubernetes driver
uses Kubernetes pods. with this driver, you can spin up pods with a defined BuildKit container image to build your images. very main character.
unlike the docker driver, built images will not automatically appear in docker images, and β¨/reference/cli/docker/buildx/build/#loadβ© needs to be used to achieve that.
π remote driver
uses a remote instance of BuildKit daemon over an arbitrary connection. with this driver, you manually create and manage instances of buildkit yourself, and configure buildx to point at it. it's giving DIY. π οΈ
unlike the docker driver, built images will not automatically appear in docker images, and β¨/reference/cli/docker/buildx/build/#loadβ© needs to be used to achieve that.
π« Set additional driver-specific options (--driver-opt) {#driver-opt}
--driver-opt OPTIONS
passes additional driver-specific options. for info about which driver options are actually available, go read the detailed documentation for the specific driver:
- β¨/build/drivers/docker/β©
- β¨/build/drivers/docker-container/β©
- β¨/build/drivers/kubernetes/β©
- β¨/build/drivers/remote/β©
π« Remove a node from a builder (--leave) {#leave}
the --leave flag changes the action of the command to remove a node from a builder. the builder needs to be specified with --name, and the node that gets removed is set with --node. π
$ docker buildx create --name mybuilder --node mybuilder0 --leave
π« Specify the name of the builder (--name) {#name}
--name NAME
the --name flag specifies the name of the builder to be created or modified. if you don't specify one, one will be automatically generated for you. surprise! π
π« Specify the name of the node (--node) {#node}
--node NODE
the --node flag specifies the name of the node to be created or modified. if you don't give it a name, the node name defaults to the name of the builder it belongs to, with an index number suffix. cute little numbered babies. π§
π« Set the platforms supported by the node (--platform) {#platform}
--platform PLATFORMS
the --platform flag sets the platforms the node supports. it expects a comma-separated list of platforms of the form OS/architecture/variant. the node will also automatically detect the platforms it supports β but manual values take priority over the detected ones, and they can be used when multiple nodes support building for the same platform. your call, your rules. π
$ docker buildx create --platform linux/amd64
$ docker buildx create --platform linux/arm64,linux/arm/v7
π« Automatically switch to the newly created builder (--use) {#use}
the --use flag automatically switches the current builder to the newly created one. equivalent to running docker buildx use $(docker buildx create ...). ```
π₯ SEE ALSO π₯
and that's the whole page, bestie π huge thanks to the folks behind this one β this doc comes from Apr 2025, DOCKER-BUILDX-CREATE(1). go forth and create something gorgeous. πΈβ¨π«Ά
π¦ where this page comes from
- debian trixie: docker-buildx 0.13.1+ds1-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms