Networking
Docker creates a software-defined network layer that controls how containers communicate with each other and the outside world. This module covers network drivers, port publishing, DNS-based service discovery, Compose networking, and troubleshooting connectivity issues.
How Docker Networking Works
flowchart TD
subgraph Host["Docker Host"]
subgraph Bridge["User-Defined Bridge Network"]
A["Container A<br/>(web)"] <-->|"DNS: api"| B["Container B<br/>(api)"]
B <-->|"DNS: db"| C["Container C<br/>(db)"]
end
P["Published Port<br/>Host:8080 → web:80"]
end
Internet <-->|"Port 8080"| P
P <--> A
style Bridge fill:#e3f2fd,stroke:#1565c0
style P fill:#fff3e0,stroke:#ef6c00
What You Will Learn
| Lesson | What It Covers |
|---|---|
| Network Drivers | Bridge, host, none, and macvlan -- when to use each |
| Port Publishing | Exposing container services to the host and outside world |
| DNS and Service Discovery | How containers find each other by name |
| Networking with Compose | Designing network topology in multi-service stacks |
| Troubleshooting | Diagnosing connectivity failures step by step |