Docker Default Networks
Explore the default Docker networks and understand when containers use them.
Docker creates default networks when it is installed.
You can see them with:
docker network lsCommon default networks are:
| Network | Meaning |
|---|---|
bridge | Default network for normal containers |
host | Container shares the host network stack |
none | Container has no network access |
Most beginner containers use the default bridge network.
Bridge network
When you run a container without specifying a network, Docker usually connects it to the default bridge network.
docker run -d --name web nginxYou can inspect the network:
docker network inspect bridgeThis shows connected containers and network details.
Host network
The host network removes much of Docker's network isolation.
docker run --network host nginxWith host networking, the container uses the host's network directly.
This can be useful in some Linux scenarios, but it is not the normal beginner choice and behaves differently on Docker Desktop.
None network
The none network gives the container no network access:
docker run --network none ubuntuThis is useful for special isolation cases, but not for normal web apps.
Default bridge limitation
The default bridge works, but it is not the best choice for multi-container applications.
Custom bridge networks are better because containers can communicate by name more cleanly.
docker network create my-networkThen run containers on that network.
Useful commands
docker network ls
docker network inspect bridge
docker network create app-network
docker network rm app-networkThe default bridge network is fine for simple containers. For real multi-container practice, create a custom bridge network.
Written By: Shiva Srivastava
How is this guide?
Last updated on
Docker Networking Introduction
Understand why Docker networking exists and how containers communicate with each other and the host.
How Docker0 Veth And Eth0 Works Docker Bridge Networking
Understand the basic moving parts behind Docker bridge networking: docker0, veth pairs, and eth0 inside containers.
