DEV Community

Pheak Pheasa
Pheak Pheasa

Posted on

To create a Docker network

docker network create [OPTIONS] NETWORK_NAME
Enter fullscreen mode Exit fullscreen mode

For example, to create a bridge network named "my-network", you can use:

docker network create my-network
Enter fullscreen mode Exit fullscreen mode

You can also specify additional options such as the driver type, subnet, gateway, and more if needed. For instance:

docker network create \
  --driver bridge \
  --subnet 172.20.0.0/16 \
  --gateway 172.20.0.1 \
  my-network
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more