When you install docker, 3 networks are automatically created.
They are bridge, host and none. There are two types of docker bridges.
Default bridge and user-defined bridge which we well learn the differences between the two in this tutorial.
Before creating containers, let’s get familiarized with our docker environment by running the following commands as shown
docker version, images, containers, note that there are two ways of showing all containers.
and then we will inspect the default bridge to find out its network configuration.
Conclusion:
For me to understand docker’s bridge network I came up with a schematic of this tutorial.
The docker default bridge network is equivalent to my schematic as shown.It has two containers which is equivalent to two virtual machines or workstations both in the same subnet, a switch, a dhcp, because you’re automatically assigned with an IP address, no dns because you cannot ping by name, and has a firewall because you can ping from the inside but not from the outside and you can access applications through port mappings or maybe access control list like in Cisco firewalls, will see as we learn more and All of these networking capabilities in one workstation.
The docker user-defined bridge is Identical to default Bridge. The only difference, it has dns, docker calls it automatic service discovery where you can ping not only by ip addresses but also by names.
For now my only issue with Docker is the lack of graphical user interface to show all of these networking capabilities like Windows Active Directory users and computers. Docker probably has one like this already I just need to research it.
source