Skip to main content

What is the none network?

none is a Docker network type in which a container starts up completely without a network. It gets its own network namespace, but that namespace has no interfaces, no routes, and no internet access, except for lo (localhost inside the container).

What this means

  • the container cannot connect to other containers;
  • the container is not accessible from outside;
  • there is no DNS, no internet access, and no connection to the host.

Essentially, this is a "container in a vacuum".

When this is used

  • for tasks that need extra isolation (for example, running untrusted code);
  • for security tests;
  • for containers that should not have a network by definition;
  • for manual network setup: first none, then custom iptables/bridge rules.

Example run

bash
docker run --network none alpine

Summary

The none network is a mode of complete network isolation. The container lives separately, with no access to other services and the internet, which improves security and gives full control over the network if it will be configured manually.

Short Answer

Interview ready
Premium

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