Script Valley
Docker: Complete Course
Docker NetworkingLesson 3.1

How Docker networking works by default

bridge network, docker0 interface, container IP assignment, default bridge, host network, none network, network isolation

Docker's Default Network Model

Docker default bridge network diagram

Every container gets a virtual network interface connected to a virtual bridge โ€” docker0 by default. Docker assigns each container a private IP (typically in the 172.17.0.0/16 range). Containers on the same bridge can reach each other by IP.

Three Built-in Network Drivers

bridge (default): Containers connect to a virtual Ethernet bridge. Good for most use cases. Containers on the same custom bridge can resolve each other by container name.

host: The container uses the host's network stack directly. No port mapping needed, but no network isolation. Linux-only.

none: No networking. Container is fully isolated from all networks. Useful for pure compute tasks.

# Run using host network
docker run --network host nginx

# Run with no network
docker run --network none my-job

Container-to-Container Communication

On the default bridge, containers can reach each other by IP but not by name. DNS resolution only works on custom bridges โ€” a critical distinction.

docker network ls           # List all networks
docker network inspect bridge  # See connected containers and their IPs

Up next

How to create custom Docker networks for container communication

Sign in to track progress

How Docker networking works by default โ€” Docker Networking โ€” Docker: Complete Course โ€” Script Valley โ€” Script Valley