← All courses

Docker networking

You'll learn how containers find each other and reach the outside world: user-defined networks and built-in DNS, port publishing, segmentation, internal, host and none networks, sidecars and compose. You'll look under the hood — DNAT in iptables and routes via nsenter — and fix a stack with several breaks.

15 tasks
  1. Containers can't find each other by nameeasy
  2. DNS in Docker: name, alias and resolvereasy
  3. Publishing ports: 127.0.0.1 vs 0.0.0.0easy
  4. EXPOSE doesn't publish a porteasy
  5. Segmentation: the storefront can't see the databasemedium
  6. A network with no way out: --internalmedium
  7. The host network and the none networkmedium
  8. A sidecar in someone else's network namespacemedium
  9. The service listens on 127.0.0.1 — neighbors can't reach itmedium
  10. The wrong neighbor address in environment variablesmedium
  11. docker compose: project networksmedium
  12. Network fact sheet: subnet, gateway and addressesmedium
  13. Port forwarding from the inside: DNAT in iptableshard
  14. A container's routes via nsenterhard
  15. A three-container stack: find the breakhard