docker-network

Create and manage docker networks.

TLDR

List all available and configured networks on docker daemon

$ docker network ls
copy


Create a user-defined network
$ docker network create --driver [driver_name] [network_name]
copy


Display detailed information of a space-separated list of networks
$ docker network inspect [network_name]
copy


Connect a container to a network using a name or ID
$ docker network connect [network_name] [container_name|ID]
copy


Disconnect a container from a network
$ docker network disconnect [network_name] [container_name|ID]
copy


Remove all unused (not referenced by any container) networks
$ docker network prune
copy


Remove a space-separated list of unused networks
$ docker network rm [network_name]
copy

SYNOPSIS

docker network

DESCRIPTION

Manage networks

OPTIONS

-h, --help[=false] help for network

SEE ALSO

docker(1), docker-network-connect(1), docker-network-create(1), docker-network-disconnect(1), docker-network-inspect(1), docker-network-ls(1), docker-network-prune(1), docker-network-rm(1)

Copied to clipboard