2016-10-14 15:30:36 -07:00
|
|
|
---
|
|
|
|
title: "network disconnect"
|
|
|
|
description: "The network disconnect command description and usage"
|
2016-11-03 15:48:30 -07:00
|
|
|
keywords: "network, disconnect, user-defined"
|
2016-10-14 15:30:36 -07:00
|
|
|
---
|
2015-09-28 18:57:03 -07:00
|
|
|
|
2016-10-19 10:25:45 -07:00
|
|
|
<!-- This file is maintained within the docker/docker Github
|
|
|
|
repository at https://github.com/docker/docker/. Make all
|
|
|
|
pull requests against that repo. If you see this file in
|
|
|
|
another repository, consider it read-only there, as it will
|
|
|
|
periodically be overwritten by the definitive file. Pull
|
|
|
|
requests which include edits to this file in other repositories
|
|
|
|
will be rejected.
|
|
|
|
-->
|
|
|
|
|
2015-09-28 18:57:03 -07:00
|
|
|
# network disconnect
|
|
|
|
|
2016-07-07 20:43:18 +02:00
|
|
|
```markdown
|
|
|
|
Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
|
2015-09-28 18:57:03 -07:00
|
|
|
|
2016-07-07 20:43:18 +02:00
|
|
|
Disconnect a container from a network
|
2016-01-12 20:56:36 -08:00
|
|
|
|
2016-07-07 20:43:18 +02:00
|
|
|
Options:
|
|
|
|
-f, --force Force the container to disconnect from a network
|
|
|
|
--help Print usage
|
|
|
|
```
|
2015-09-28 18:57:03 -07:00
|
|
|
|
2015-10-18 16:47:32 -07:00
|
|
|
Disconnects a container from a network. The container must be running to disconnect it from the network.
|
2015-09-28 18:57:03 -07:00
|
|
|
|
2015-10-18 16:47:32 -07:00
|
|
|
```bash
|
2015-09-28 18:57:03 -07:00
|
|
|
$ docker network disconnect multi-host-network container1
|
|
|
|
```
|
|
|
|
|
2015-10-18 16:47:32 -07:00
|
|
|
|
|
|
|
## Related information
|
|
|
|
|
|
|
|
* [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/)
|