

#Default docker network for free#
This is a general network and server monitoring tool that can be enhanced by adding on an agent for Docker, which is available for free from the Docker Hub.
#Default docker network software#
The effect of command used above is that it will create a software bridge inside the docker host, which can be further configured. We have to achieve something like shown in the picture diagram below: Ping containers connected to a “user-defined network”įirst of all, we need to create one “ user-defined” bridge using the following command: $ docker network create my-alpine-network Create user-defined bridge “my-alpine-network” $ docker network inspect bridge | grep Containers Again check the configuration of “docker0” User-Defined bridge docker network $ docker container stop container1 $ docker container stop container2 $ docker container rm container1 $ docker container container2 Stop and remove the “container1” and “container2”Īgain, from the screenshot below, we can confirm that after deleting the containers from the system, they no more exist in the “ docker0 bridge” configuration. Now, it is time to clean our playground, so stop and remove both the containers. $ docker network inspect bridge | grep -A 14 Containers Now check the configuration of “docker0” bridge network Now, check from the output of the following command, that the “ Containers” section of the “ docker0 bridge” is no more empty, it is now showing both the containers, “ container1” and “ container2” in it. # ping container1 Ping from container2 (172.17.0.3) to container1 (172.17.0.2) after editing the hosts’ file of container2

Now, from the “ gif” below, we can confirm that the “ container2” can reach “ container1” using its name and not its IP-Address. # ping container2 Ping from container1 (172.17.0.2) to container2 (172.17.0.3) after editing the hosts file of container1 # cat /etc/hosts Edit the hosts file of “container2”

Now, from the “ gif” below, we can confirm that the “ container1” can reach “ container2” using its name and not its IP-Address. # cat /etc/hosts Edit the hosts file of “container1”
#Default docker network driver#

Scope = local Now, check the available networks, by default on a docker host: $ docker network ls Default networks available on linux docker hostįrom the photo above, for this particular post, we are interested in the highlighted one, which is “ bridge“.īefore moving further, look at the default or stock configuration of this “ docker0” bridge network using the command below: $ docker network inspect bridge “docker0” bridge network default configurationįrom the image above, we have to note a few things: Ping containers connected to default bridge “docker0”įirst, we will check the existence of this network by the following command: $ ip a s docker0 Default docker0 bridge network on ubuntu 18.04
