Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 1.49 KB

networks.md

File metadata and controls

71 lines (52 loc) · 1.49 KB

Docker Networks

Manage Docker's virtual networks. These commands let you configure how containers communicate with each other.

List networks

List all networks that the Docker daemon knows about. #ls

docker network ls

Create a network

Create a new custom network. #new

docker network create $network_name

Remove a network

Remove one or more networks. #rm #delete #purge

docker network rm $network

Inspect a network

Display detailed information on one or more networks. #details #json

docker network inspect $network

Connect a container to a network

Connect a running container to a network. #join

docker network connect $network $container_running

Disconnect a container from a network

Disconnect a container from a network. #leave #remove

docker network disconnect $network $container_running