Add NETWORK_NAME_or_ID value for --net= option

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
This commit is contained in:
Wen Cheng Ma 2015-11-30 16:28:54 +08:00 committed by Tibor Vass
parent 178a2cfe7c
commit deae0706ea
6 changed files with 29 additions and 22 deletions

View File

@ -278,7 +278,7 @@ __docker_network_commands() {
"disconnect:Disconnects a container from a network" "disconnect:Disconnects a container from a network"
"inspect:Displays detailed information on a network" "inspect:Displays detailed information on a network"
"ls:Lists all the networks created by the user" "ls:Lists all the networks created by the user"
"rm:Deletes a network" "rm:Deletes one or more networks"
) )
_describe -t docker-network-commands "docker network command" _docker_network_subcommands _describe -t docker-network-commands "docker network command" _docker_network_subcommands
} }

View File

@ -56,7 +56,12 @@ Creates a new container.
--memory-swap="" Total memory (memory + swap), '-1' to disable swap --memory-swap="" Total memory (memory + swap), '-1' to disable swap
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
--name="" Assign a name to the container --name="" Assign a name to the container
--net="default" Set the Network mode for the container --net="bridge" Connect a container to a network
'bridge': create a network stack on the default Docker bridge
'none': no networking
'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
--oom-kill-disable=false Whether to disable OOM Killer for the container or not --oom-kill-disable=false 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=false Publish all exposed ports to random ports -P, --publish-all=false Publish all exposed ports to random ports

View File

@ -55,12 +55,12 @@ parent = "smn_cli"
--memory-swap="" Total memory (memory + swap), '-1' to disable swap --memory-swap="" Total memory (memory + swap), '-1' to disable swap
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
--name="" Assign a name to the container --name="" Assign a name to the container
--net="bridge" Connects a container to a network --net="bridge" Connect a container to a network
'bridge': creates a new network stack for the container on the docker bridge 'bridge': create a network stack on the default Docker bridge
'none': no networking for this container 'none': no networking
'container:<name|id>': reuses another container network stack 'container:<name|id>': reuse another container's network stack
'host': use the host network stack inside the container 'host': use the Docker host network stack
'NETWORK': connects the container to user-created network using `docker network create` command '<network-name>|<network-id>': connect to a user-defined network
--oom-kill-disable=false Whether to disable OOM Killer for the container or not --oom-kill-disable=false 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=false Publish all exposed ports to random ports -P, --publish-all=false Publish all exposed ports to random ports

View File

@ -244,12 +244,12 @@ of the containers.
## Network settings ## Network settings
--dns=[] : Set custom dns servers for the container --dns=[] : Set custom dns servers for the container
--net="bridge" : Connects a container to a network --net="bridge" : Connect a container to a network
'bridge': creates a new network stack for the container on the docker bridge 'bridge': create a network stack on the default Docker bridge
'none': no networking for this container 'none': no networking
'container:<name|id>': reuses another container network stack 'container:<name|id>': reuse another container's network stack
'host': use the host network stack inside the container 'host': use the Docker host network stack
'NETWORK': connects the container to user-created network using `docker network create` command '<network-name>|<network-id>': connect to a user-defined network
--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

View File

@ -227,10 +227,11 @@ This value should always larger than **-m**, so you should always use this with
**--net**="*bridge*" **--net**="*bridge*"
Set the Network mode for the container Set the Network mode for the container
'bridge': creates a new network stack for the container on the docker bridge 'bridge': create a network stack on the default Docker bridge
'none': no networking for this container 'none': no networking
'container:<name|id>': reuses another container network stack 'container:<name|id>': reuse another container's network stack
'host': use the host network stack inside the container. 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
**--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

@ -339,10 +339,11 @@ and foreground Docker containers.
**--net**="*bridge*" **--net**="*bridge*"
Set the Network mode for the container Set the Network mode for the container
'bridge': creates a new network stack for the container on the docker bridge 'bridge': create a network stack on the default Docker bridge
'none': no networking for this container 'none': no networking
'container:<name|id>': reuses another container network stack 'container:<name|id>': reuse another container's network stack
'host': use the host network stack inside the container. 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
**--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.