1
0
mirror of https://github.com/docker/cli.git synced 2025-08-01 04:26:55 +03:00

Network scoped alias support

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal
2016-01-08 05:45:56 -08:00
committed by Tibor Vass
parent ea995dd3ba
commit 46db31de0a
6 changed files with 19 additions and 0 deletions

View File

@ -68,6 +68,7 @@ Creates a new container.
'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network
--net-alias=[] Add network-scoped alias for the container
--oom-kill-disable Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all Publish all exposed ports to random ports

View File

@ -14,6 +14,7 @@ parent = "smn_cli"
Connects a container to a network
--alias=[] Add network-scoped alias for the container
--help Print usage
--ip IPv4 Address
--ip6 IPv6 Address
@ -45,6 +46,13 @@ You can use `--link` option to link another container with a prefered alias
$ docker network connect --link container1:c1 multi-host-network container2
```
`--alias` option can be used to resolve the container by another name in the network
being connected to.
```bash
$ docker network connect --alias db --alias mysql multi-host-network container2
```
You can pause, restart, and stop containers that are connected to a network.
Paused containers remain connected and can be revealed by a `network inspect`.
When the container is stopped, it does not appear on the network until you restart

View File

@ -68,6 +68,7 @@ parent = "smn_cli"
'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network
--net-alias=[] Add network-scoped alias for the container
--oom-kill-disable Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all Publish all exposed ports to random ports