11: Docker Networking
It’s always the network!
Any time there’s a an infrastructure problem, we always blame the network. Part of the reason is that networks are at the center of everything — no network, no app!
In the early days of Docker, networking was hard — really hard. These days, it’s almost a pleasure ;-)
In this chapter, we’ll look at the fundamentals of Docker networking. Things like the Container Network Model (CNM) and libnetwork
. We’ll also get our hands dirty building some networks.
As usual, we’ll split the chapter into three parts:
- The TLDR
- The deep dive
- The commands
Docker Networking - The TLDR
Docker runs applications inside of containers, and applications need to communicate over lots of different networks. This means Docker needs strong networking capabilities.
Fortunately, Docker has solutions for container-to-container networks, as well as connecting to existing networks and VLANs. The latter...