Docker Bridge Networks
Cheat sheet · https://pcornel.dk/topic.php?topic=6130
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 codesdocker logs <c>— container outputdocker 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