User Tools

Site Tools


docker:networking:default_docker_networks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docker:networking:default_docker_networks [2025/07/25 19:20] – created peterdocker:networking:default_docker_networks [2025/07/25 19:23] (current) peter
Line 1: Line 1:
 ====== Docker - Networking - Default Docker Networks ====== ====== Docker - Networking - Default Docker Networks ======
 +
 +When Docker is installed, it automatically creates a few default networks:
 +
 +  * **Bridge**: The default network for containers.
 +    * If no network is specified when creating a container, Docker places it in the bridge network.
 +    * The default network type for containers on standalone hosts.
 +    * Containers on the same bridge network can communicate with each other via IP addresses, and you can also map container ports to the host system.
 +  * **Host**: Bypasses Docker’s virtualized network stack and allows the container to use the host’s network directly.
 +    * This network mode allows a container to share the host system’s network stack.
 +    * No isolation between the container and the host network.
 +  * **None**: Containers are isolated with no network interface, perfect for processes that do not need network connectivity.
 +
 +----
 +
 +====== Docker - Networking - The default network ======
 +
 +Every clean installation of Docker comes with a pre-built network called **bridge**. 
 +
 +<code bash>
 +docker network ls
 +</code>
 +
 +returns:
 +
 +<code>
 +NETWORK ID     NAME      DRIVER    SCOPE
 +45df8a26c099   bridge    bridge    local
 +99d0975ea463   host      host      local
 +0190ffd8ff93   none      null      local
 +</code>
 +
 +
 +<WRAP info>
 +**NOTE:**  The **bridge** network is associated with the bridge driver.
 +
 +  * It is important to note that the network and the driver are connected, but they are not the same.
 +    * In this example the network and the driver have the same name - but they are not the same thing!
 +
 +  * The output above also shows that the bridge network is scoped locally.
 +    * This means that the network only exists on this Docker host.
 +    * This is true of all networks using the bridge driver - the bridge driver provides single-host networking.
 +
 +  * All networks created with the bridge driver are based on a Linux bridge (a.k.a. a virtual switch).
 +
 +</WRAP>
 +
 +----
 +
  
docker/networking/default_docker_networks.txt · Last modified: 2025/07/25 19:23 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki