diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index f4dd125acc..ad23995ac1 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -68,6 +68,7 @@ Creates a new container. 'container:': reuse another container's network stack 'host': use the Docker host network stack '|': 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 diff --git a/docs/reference/commandline/network_connect.md b/docs/reference/commandline/network_connect.md index eba6a6830c..b08dec3225 100644 --- a/docs/reference/commandline/network_connect.md +++ b/docs/reference/commandline/network_connect.md @@ -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 diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index f6cff75ee2..a36bbfb96a 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -68,6 +68,7 @@ parent = "smn_cli" 'container:': reuse another container's network stack 'host': use the Docker host network stack '|': 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 diff --git a/docs/reference/run.md b/docs/reference/run.md index 63d4efc9df..95e0e0a605 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -273,6 +273,7 @@ of the containers. 'container:': reuse another container's network stack 'host': use the Docker host network stack '|': 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) --mac-address="" : Sets the container's Ethernet device's MAC address --ip="" : Sets the container's Ethernet device's IPv4 address diff --git a/man/docker-create.1.md b/man/docker-create.1.md index ca859bd66d..08074ac431 100644 --- a/man/docker-create.1.md +++ b/man/docker-create.1.md @@ -52,6 +52,7 @@ docker-create - Create a new container [**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] [**--name**[=*NAME*]] [**--net**[=*"bridge"*]] +[**--net-alias**[=*[]*]] [**--oom-kill-disable**] [**--oom-score-adj**[=*0*]] [**-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. '|': connect to a user-defined network +**--net-alias**=[] + Add network-scoped alias for the container + **--oom-kill-disable**=*true*|*false* Whether to disable OOM Killer for the container or not. diff --git a/man/docker-run.1.md b/man/docker-run.1.md index c639b14380..ea9b0b8168 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -54,6 +54,7 @@ docker-run - Run a command in a new container [**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] [**--name**[=*NAME*]] [**--net**[=*"bridge"*]] +[**--net-alias**[=*[]*]] [**--oom-kill-disable**] [**--oom-score-adj**[=*0*]] [**-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. '|': connect to a user-defined network +**--net-alias**=[] + Add network-scoped alias for the container + **--oom-kill-disable**=*true*|*false* Whether to disable OOM Killer for the container or not.