When installing Docker three types of network which can be consulted 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 starting a container, the default is to use the network bridge
, where the container will join an isolated NAT network with other containers. This network by default is already isolated of the rest of the network.
To 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 similar to the external
virtualbox.
Beyond these 3 Networks it is possible to create Networks customized to have even more isolation between your containers. More information you can consult the documentation of Docker about Networks.
Thanks for the clarification.
– Fábio Jânio