
This is the bridge that was automatically created for the bridge network. The output above shows a single Linux bridge called docker0.
#Docker network options install
# Install the brctl toolsīridge name bridge id STP enabled interfaces Install the brctl command and use it to list the Linux bridges on your Docker host.
#Docker network options driver
This is true of all networks using the bridge driver - the bridge driver provides single-host networking.Īll networks created with the bridge driver are based on a Linux bridge (a.k.a. This means that the network only exists on this Docker host. The output above also shows that the bridge network is scoped locally. In this example the network and the driver have the same name - but they are not the same thing! It’s important to note that the network and the driver are connected, but they are not the same. The output above shows that the bridge network is associated with the bridge driver. Verify this with the docker network ls command.
#Docker network options how to
In this lab you’ll learn how to build, manage, and use bridge networks. The output above shows the bridge, host, null, and overlay drivers. Run a docker info command on any of your Docker hosts and locate the list of network plugins. The docker info command shows a lot of interesting information about a Docker installation. Do not confuse this with the “bridge” driver.

In the example above we are showing the configuration details for the network called “bridge”. NOTE: The syntax of the docker network inspect command is docker network inspect, where can be either network name or network ID. The command below shows the details of the network called bridge. Use docker network inspect to view configuration details of the container networks on your Docker host.

These details include name, ID, driver, IPAM driver, subnet info, connected containers, and more.

The docker network inspect command is used to view network configuration details. Notice that the “bridge” network and the “host” network have the same name as their respective drivers. Each network is also associated with a single driver. You can see that each network gets a unique ID and NAME. New networks that you create will also show up in the output of the docker network ls command. The output above shows the container networks that are created as part of a standard installation of Docker. Run a docker network ls command to view existing container networks on the current Docker host. It also allows you to connect and disconnect containers from networks. As you can see from the output, the docker network command allows you to create new networks, list existing networks, inspect networks, and remove networks. The command output shows how to use the command as well as all of the docker network sub-commands.

Run 'docker network COMMAND -help' for more information on a command. Inspect Display detailed information on one or more networks $ docker networkĭisconnect Disconnect a container from a network Run a simple docker network command from any of your lab machines. The docker network command is the main command for configuring and managing container networks.
