Until now, we have worked with a single container and accessed it locally. But as we move to more real-world use cases, we will need to access the container from the outside world, share external storage within the container, communicate with containers running on other hosts, and so on. In this chapter, we'll learn how to fulfill some of those requirements. Let's start by understanding Docker's default networking setup and then move on to advanced use cases.
When the Docker daemon starts, it creates a virtual Ethernet bridge with the name docker0. Perhaps we can glean more insight into docker0 using the ip addr command on the system that runs the Docker daemon:
As we can see, docker0 has the IP address of 172.17.0.1/16. Docker ...