File tree Expand file tree Collapse file tree
content/manuals/build/buildkit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,9 +136,29 @@ $ docker buildx build --push --tag myregistry.com/myimage:latest .
136136## CNI networking
137137
138138CNI networking for builders can be useful for dealing with network port
139- contention during concurrent builds. CNI is [not yet](https://github.com/moby/buildkit/issues/28)
140- available in the default BuildKit image. But you can create your own image that
141- includes CNI support.
139+ contention during concurrent builds.
140+
141+ ### Bridge networking
142+
143+ The BuildKit image ships with a built-in bridge network provider that uses a
144+ minimal set of bundled CNI plugins, so you don' t need to build a custom image
145+ or supply your own CNI configuration. To use it, set the worker network mode to
146+ ` bridge` when you create the builder:
147+
148+ ` ` ` console
149+ $ docker buildx create --use --bootstrap \
150+ --name mybuilder \
151+ --driver docker-container \
152+ --buildkitd-flags "--oci-worker-net=bridge"
153+ ` ` `
154+
155+ BuildKit creates a ` buildkit0` bridge with a default subnet of ` 10.10.0.0/16` ,
156+ and cleans up the bridge automatically when the daemon shuts down.
157+
158+ # ## Custom CNI configuration
159+
160+ For more control over networking, build a custom BuildKit image with your own
161+ CNI configuration and plugins.
142162
143163The following Dockerfile example shows a custom BuildKit image with CNI support.
144164It uses the [CNI config for integration tests](https://github.com/moby/buildkit/blob/master//hack/fixtures/cni.json)
You can’t perform that action at this time.
0 commit comments