The following is the Docker networking model to interconnect containers in a single host:
Each Container resides in its own networking namespace and uses a Linux bridge on the host machine to talk to each other. More details on Docker networking options can be found at https://docs.docker.com/engine/userguide/networking/dockernetworks/. The following are the networking options available as of Docker release 1.9:
--net=bridge: This is the default option that Docker provides, where containers connect to the Linux
dockerbridge using a veth pair.
--net=host: In this option, there is no new network namespace created for the container, ...