Skip to main content

What types of networks exist in Docker by default?

By default, Docker creates three types of networks that are available right after installation:


1. bridge (the default for containers)

  • This is the standard internal network on a single host.
  • Containers inside bridge can communicate with each other.
  • From outside, the container is accessible only through published ports.
  • Used by default when a container is started without specifying a network.

Example:

bash
docker run -d nginx

The container ends up in bridge.


2. host

  • The container uses the host's network stack directly.
  • The container has no IP of its own; it essentially "lives" on the host's network.
  • Useful for tasks that need maximum network speed or direct access to the interface.

Example:

bash
docker run --network host nginx

3. none

  • The container has no network at all.
  • No internet access, no communication with other containers.
  • Suitable for fully isolated tasks.

Example:

bash
docker run --network none nginx

Summary table

Network typeVisibility between containersInternet accessFeature
bridgeYes, within the networkYesUsed by default
hostNo isolation from the hostYesMaximum speed, no separate IP
noneNoNoFull isolation

Summary: by default, Docker provides three networks: bridge, host, none, and each of them is responsible for its own level of isolation and interaction.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.