Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 896 Bytes

custom-network.md

File metadata and controls

34 lines (26 loc) · 896 Bytes

Using a custom network

Create a network named foonet:

$ docker network create foonet

Create a docker-container builder named mybuilder that will use this network:

$ docker buildx create --use \
  --name mybuilder \
  --driver docker-container \
  --driver-opt "network=foonet"

Boot and inspect mybuilder:

$ docker buildx inspect --bootstrap

Inspect the builder container and see what network is being used:

{% raw %}

$ docker inspect buildx_buildkit_mybuilder0 --format={{.NetworkSettings.Networks}}
map[foonet:0xc00018c0c0]

{% endraw %}