Add docker network connect/disconnect to non-running container

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 79d4f0f56ec84922184e25c0263807158b6fb76b
Component: engine
This commit is contained in:
Lei Jitang
2016-01-11 20:13:39 -05:00
parent 5dc0139c60
commit 3b26d1d1d4
7 changed files with 105 additions and 42 deletions

View File

@ -327,9 +327,8 @@ PING 172.17.0.2 (172.17.0.2): 56 data bytes
```
To connect a container to a network, the container must be running. If you stop
a container and inspect a network it belongs to, you won't see that container.
The `docker network inspect` command only shows running containers.
You can connect both running and non-running containers to a network. However,
`docker network inspect` only displays information on running containers.
## Disconnecting containers