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 'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack 'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network '<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-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) --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 -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 Connects a container to a network
--alias=[] Add network-scoped alias for the container
--help Print usage --help Print usage
--ip IPv4 Address --ip IPv4 Address
--ip6 IPv6 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 $ 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. 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`. 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 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 'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack 'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network '<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-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) --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 -P, --publish-all Publish all exposed ports to random ports

View File

@ -273,6 +273,7 @@ of the containers.
'container:<name|id>': reuse another container's network stack 'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack 'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network '<network-name>|<network-id>': connect to a user-defined network
--net-alias=[] : Add network-scoped alias for the container
--add-host="" : Add a line to /etc/hosts (host:IP) --add-host="" : Add a line to /etc/hosts (host:IP)
--mac-address="" : Sets the container's Ethernet device's MAC address --mac-address="" : Sets the container's Ethernet device's MAC address
--ip="" : Sets the container's Ethernet device's IPv4 address --ip="" : Sets the container's Ethernet device's IPv4 address

View File

@ -52,6 +52,7 @@ docker-create - Create a new container
[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] [**--memory-swappiness**[=*MEMORY-SWAPPINESS*]]
[**--name**[=*NAME*]] [**--name**[=*NAME*]]
[**--net**[=*"bridge"*]] [**--net**[=*"bridge"*]]
[**--net-alias**[=*[]*]]
[**--oom-kill-disable**] [**--oom-kill-disable**]
[**--oom-score-adj**[=*0*]] [**--oom-score-adj**[=*0*]]
[**-P**|**--publish-all**] [**-P**|**--publish-all**]
@ -265,6 +266,9 @@ unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
'host': use the Docker host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure. 'host': use the Docker host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
'<network-name>|<network-id>': connect to a user-defined network '<network-name>|<network-id>': connect to a user-defined network
**--net-alias**=[]
Add network-scoped alias for the container
**--oom-kill-disable**=*true*|*false* **--oom-kill-disable**=*true*|*false*
Whether to disable OOM Killer for the container or not. Whether to disable OOM Killer for the container or not.

View File

@ -54,6 +54,7 @@ docker-run - Run a command in a new container
[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] [**--memory-swappiness**[=*MEMORY-SWAPPINESS*]]
[**--name**[=*NAME*]] [**--name**[=*NAME*]]
[**--net**[=*"bridge"*]] [**--net**[=*"bridge"*]]
[**--net-alias**[=*[]*]]
[**--oom-kill-disable**] [**--oom-kill-disable**]
[**--oom-score-adj**[=*0*]] [**--oom-score-adj**[=*0*]]
[**-P**|**--publish-all**] [**-P**|**--publish-all**]
@ -383,6 +384,9 @@ and foreground Docker containers.
'host': use the Docker host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure. 'host': use the Docker host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
'<network-name>|<network-id>': connect to a user-defined network '<network-name>|<network-id>': connect to a user-defined network
**--net-alias**=[]
Add network-scoped alias for the container
**--oom-kill-disable**=*true*|*false* **--oom-kill-disable**=*true*|*false*
Whether to disable OOM Killer for the container or not. Whether to disable OOM Killer for the container or not.