Pcornel
Containers · Container Networking

Docker Bridge Networks

Cheat sheet · https://pcornel.dk/topic.php?topic=6130

Back to the Topic

Answer

Docker bridge networks connect containers on one host through a Linux bridge with NAT to the outside. The default bridge has no DNS between containers; user-defined bridges do.

Remember

Create a user-defined network for each app (docker network create). Containers on different networks are isolated. Docker adds iptables NAT rules — host firewall tools may interact.

First checks

  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state

Commands

docker network connect

Verify in this order

container veth → docker bridge → NAT → host network

Where it usually breaks

Containers on different user-defined networks cannot reach each other unless connected to a shared network.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6130

Confirmation

Confirm action

Continue?