2015-09-28 18:57:03 -07:00
|
|
|
# network disconnect
|
|
|
|
|
2023-01-06 19:04:05 +01:00
|
|
|
<!---MARKER_GEN_START-->
|
2016-07-07 20:43:18 +02:00
|
|
|
Disconnect a container from a network
|
2016-01-12 20:56:36 -08:00
|
|
|
|
2023-01-06 19:04:05 +01:00
|
|
|
### Options
|
|
|
|
|
|
|
|
| Name | Type | Default | Description |
|
|
|
|
|:----------------|:-----|:--------|:-------------------------------------------------|
|
|
|
|
| `-f`, `--force` | | | Force the container to disconnect from a network |
|
|
|
|
|
|
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
2015-09-28 18:57:03 -07:00
|
|
|
|
2017-02-07 15:42:48 -08:00
|
|
|
## Description
|
|
|
|
|
|
|
|
Disconnects a container from a network. The container must be running to
|
|
|
|
disconnect it from the network.
|
|
|
|
|
|
|
|
## Examples
|
2015-09-28 18:57:03 -07:00
|
|
|
|
2021-08-21 14:54:14 +02:00
|
|
|
```console
|
2020-04-19 15:43:08 +02:00
|
|
|
$ docker network disconnect multi-host-network container1
|
2015-09-28 18:57:03 -07:00
|
|
|
```
|
|
|
|
|
2015-10-18 16:47:32 -07:00
|
|
|
|
2017-02-07 15:42:48 -08:00
|
|
|
## Related commands
|
2015-10-18 16:47:32 -07:00
|
|
|
|
|
|
|
* [network inspect](network_inspect.md)
|
|
|
|
* [network connect](network_connect.md)
|
|
|
|
* [network create](network_create.md)
|
|
|
|
* [network ls](network_ls.md)
|
|
|
|
* [network rm](network_rm.md)
|
2016-10-18 04:36:52 +00:00
|
|
|
* [network prune](network_prune.md)
|
2016-10-21 11:24:28 +08:00
|
|
|
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
|