From deae0706ea32639a73a088ea183fac33f745eb2c Mon Sep 17 00:00:00 2001 From: Wen Cheng Ma Date: Mon, 30 Nov 2015 16:28:54 +0800 Subject: [PATCH] Add NETWORK_NAME_or_ID value for --net= option Signed-off-by: Wen Cheng Ma --- contrib/completion/zsh/_docker | 2 +- docs/reference/commandline/create.md | 7 ++++++- docs/reference/commandline/run.md | 12 ++++++------ docs/reference/run.md | 12 ++++++------ man/docker-create.1.md | 9 +++++---- man/docker-run.1.md | 9 +++++---- 6 files changed, 29 insertions(+), 22 deletions(-) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index e5a3d9ce1c..4212d8172c 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -278,7 +278,7 @@ __docker_network_commands() { "disconnect:Disconnects a container from a network" "inspect:Displays detailed information on a network" "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 } diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index e5bc7b5ab2..df41ccb75f 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -56,7 +56,12 @@ Creates a new container. --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. --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:': reuse another container's network stack + 'host': use the Docker host network stack + '|': connect to a user-defined network --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) -P, --publish-all=false Publish all exposed ports to random ports diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 794e37e8e3..4841384681 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -55,12 +55,12 @@ parent = "smn_cli" --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. --name="" Assign a name to the container - --net="bridge" Connects a container to a network - 'bridge': creates a new network stack for the container on the docker bridge - 'none': no networking for this container - 'container:': reuses another container network stack - 'host': use the host network stack inside the container - 'NETWORK': connects the container to user-created network using `docker network create` command + --net="bridge" Connect a container to a network + 'bridge': create a network stack on the default Docker bridge + 'none': no networking + 'container:': reuse another container's network stack + 'host': use the Docker host network stack + '|': connect to a user-defined network --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) -P, --publish-all=false Publish all exposed ports to random ports diff --git a/docs/reference/run.md b/docs/reference/run.md index b40888bf6d..80961f91c5 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -244,12 +244,12 @@ of the containers. ## Network settings --dns=[] : Set custom dns servers for the container - --net="bridge" : Connects a container to a network - 'bridge': creates a new network stack for the container on the docker bridge - 'none': no networking for this container - 'container:': reuses another container network stack - 'host': use the host network stack inside the container - 'NETWORK': connects the container to user-created network using `docker network create` command + --net="bridge" : Connect a container to a network + 'bridge': create a network stack on the default Docker bridge + 'none': no networking + 'container:': reuse another container's network stack + 'host': use the Docker host network stack + '|': connect to a user-defined network --add-host="" : Add a line to /etc/hosts (host:IP) --mac-address="" : Sets the container's Ethernet device's MAC address diff --git a/man/docker-create.1.md b/man/docker-create.1.md index 961aa85cbb..1e1d2df6f7 100644 --- a/man/docker-create.1.md +++ b/man/docker-create.1.md @@ -227,10 +227,11 @@ This value should always larger than **-m**, so you should always use this with **--net**="*bridge*" Set the Network mode for the container - 'bridge': creates a new network stack for the container on the docker bridge - 'none': no networking for this container - 'container:': reuses another container 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. + 'bridge': create a network stack on the default Docker bridge + 'none': no networking + 'container:': reuse another container's network stack + '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 **--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 1e1c7f0e0d..a423d55fac 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -339,10 +339,11 @@ and foreground Docker containers. **--net**="*bridge*" Set the Network mode for the container - 'bridge': creates a new network stack for the container on the docker bridge - 'none': no networking for this container - 'container:': reuses another container 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. + 'bridge': create a network stack on the default Docker bridge + 'none': no networking + 'container:': reuse another container's network stack + '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 **--oom-kill-disable**=*true*|*false* Whether to disable OOM Killer for the container or not.