January 2019
Intermediate to advanced
484 pages
11h 48m
English
Docker provides three kinds of networks to manage communications between containers and the hosts, namely bridge, host, and none:
$ docker network lsNETWORK ID NAME DRIVER SCOPE8bb41db6b13e bridge bridge local4705332cb39e host host local75ab6cbbbbac none null local
By default, every container is connected to the bridge network upon creation. In this mode, every container is allocated a virtual interface as well as a private IP address, and the traffic going through the interface is bridged to the host's docker0 interface. Containers within the same bridge network can also connect to each other via their IP address. Let's run one container that's feeding a short message over port 5000, and observe its configuration. The ...
Read now
Unlock full access