Networking for Dockers
Docker networking connects containers to each other and to the outside world. The default bridge network isolates containers on one host, user-defined bridges add name-based DNS, and published ports with -p expose a container service to the host. Reverse proxies often sit in front of several published services.
Stage: Data and Networking · Part of the Docker roadmap · Last reviewed 19 November 2026
What to learn in Networking
- Create a user-defined bridge network and reach one container from another by name
- Publish a container port to a chosen host port and bind it to a specific interface
- Explain the difference between bridge, host and none network drivers
- Inspect a network and a container's IP address with docker network inspect
- Place a reverse proxy such as Nginx in front of several containers
Networking interview questions
Why can containers on a user-defined bridge reach each other by name but not on the default bridge?
User-defined bridge networks include an embedded DNS server that resolves container names and aliases to IP addresses. The legacy default bridge has no such resolution, so containers there need explicit links or raw IP addresses, which change between runs.
What does -p 8080:80 do?
It publishes the container's port 80 on port 8080 of the host. Traffic arriving at the host on 8080 is forwarded to the container. Without publishing, a container port is reachable only from other containers on the same Docker network.
Where Networking fits in the Docker roadmap
Networking belongs to the Data and Networking stage (beginner level), which takes about 12 hours. Connect and persist.
Other units in this stage
Back to the full Docker roadmap