mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 07:49:04 +00:00
Update cheatsheets
This commit is contained in:
37
docker-network
Normal file
37
docker-network
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# docker network
|
||||
|
||||
> Create and manage docker networks.
|
||||
> More information: <https://docs.docker.com/engine/reference/commandline/network/>.
|
||||
|
||||
- List all available and configured networks on docker daemon:
|
||||
|
||||
`docker network ls`
|
||||
|
||||
- Create a user-defined network:
|
||||
|
||||
`docker network create --driver {{driver_name}} {{network_name}}`
|
||||
|
||||
- Display detailed information about one or more networks:
|
||||
|
||||
`docker network inspect {{network_name1 network_name2 ...}}`
|
||||
|
||||
- Connect a container to a network using a name or ID:
|
||||
|
||||
`docker network connect {{network_name}} {{container_name|ID}}`
|
||||
|
||||
- Disconnect a container from a network:
|
||||
|
||||
`docker network disconnect {{network_name}} {{container_name|ID}}`
|
||||
|
||||
- Remove all unused (not referenced by any container) networks:
|
||||
|
||||
`docker network prune`
|
||||
|
||||
- Remove one or more unused networks:
|
||||
|
||||
`docker network rm {{network_name1 network_name2 ...}}`
|
||||
Reference in New Issue
Block a user