When you install Docker, three types of network are created that can be queried with the command below:
> docker network ls
NETWORK ID NAME DRIVER SCOPE
0a9cecbcdf3e bridge bridge local
7787cba5673e host host local
2a6fba328597 none null local
When you start a container, the default is to use network bridge
, where the container will join an isolated NAT network with other containers. This network by default is already isolated from the rest of the network.
The network host
in this case will do the opposite of what it looks like. It will make your container have contact with the host network, something like external
of the virtualbox.
In addition to these 3 networks you can create networks in> customized to have even more insulation between your containers. More information can be found in the Docker on networks documentation.