mirror of https://github.com/docker/cli.git
Docs: fix commandline doc create.md and run.md
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
7301088482
commit
30dbdd7943
|
@ -25,10 +25,10 @@ Creates a new container.
|
||||||
--cap-drop=[] Drop Linux capabilities
|
--cap-drop=[] Drop Linux capabilities
|
||||||
--cgroup-parent="" Optional parent cgroup for the container
|
--cgroup-parent="" Optional parent cgroup for the container
|
||||||
--cidfile="" Write the container ID to the file
|
--cidfile="" Write the container ID to the file
|
||||||
|
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
|
||||||
|
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
|
||||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||||
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period
|
|
||||||
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota
|
|
||||||
--device=[] Add a host device to the container
|
--device=[] Add a host device to the container
|
||||||
--dns=[] Set custom DNS servers
|
--dns=[] Set custom DNS servers
|
||||||
--dns-search=[] Set custom DNS search domains
|
--dns-search=[] Set custom DNS search domains
|
||||||
|
@ -37,6 +37,7 @@ Creates a new container.
|
||||||
--env-file=[] Read in a file of environment variables
|
--env-file=[] Read in a file of environment variables
|
||||||
--expose=[] Expose a port or a range of ports
|
--expose=[] Expose a port or a range of ports
|
||||||
-h, --hostname="" Container host name
|
-h, --hostname="" Container host name
|
||||||
|
--help=false Print usage
|
||||||
-i, --interactive=false Keep STDIN open even if not attached
|
-i, --interactive=false Keep STDIN open even if not attached
|
||||||
--ipc="" IPC namespace to use
|
--ipc="" IPC namespace to use
|
||||||
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
|
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
|
||||||
|
@ -47,20 +48,22 @@ Creates a new container.
|
||||||
--lxc-conf=[] Add custom lxc options
|
--lxc-conf=[] Add custom lxc options
|
||||||
-m, --memory="" Memory limit
|
-m, --memory="" Memory limit
|
||||||
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||||
|
--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
|
--name="" Assign a name to the container
|
||||||
--net="bridge" Set the Network mode for the container
|
--net="bridge" Set the Network mode for the container
|
||||||
--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
|
||||||
-P, --publish-all=false Publish all exposed ports to random ports
|
-P, --publish-all=false Publish all exposed ports to random ports
|
||||||
-p, --publish=[] Publish a container's port(s) to the host
|
-p, --publish=[] Publish a container's port(s) to the host
|
||||||
--pid="" PID namespace to use
|
--pid="" PID namespace to use
|
||||||
--uts="" UTS namespace to use
|
|
||||||
--privileged=false Give extended privileges to this container
|
--privileged=false Give extended privileges to this container
|
||||||
--read-only=false Mount the container's root filesystem as read only
|
--read-only=false Mount the container's root filesystem as read only
|
||||||
--restart="no" Restart policy (no, on-failure[:max-retry], always)
|
--restart="no" Restart policy (no, on-failure[:max-retry], always)
|
||||||
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
|
|
||||||
--security-opt=[] Security options
|
--security-opt=[] Security options
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
-u, --user="" Username or UID
|
-u, --user="" Username or UID
|
||||||
|
--ulimit=[] Ulimit options
|
||||||
|
--uts="" UTS namespace to use
|
||||||
-v, --volume=[] Bind mount a volume
|
-v, --volume=[] Bind mount a volume
|
||||||
--volumes-from=[] Mount volumes from the specified container(s)
|
--volumes-from=[] Mount volumes from the specified container(s)
|
||||||
-w, --workdir="" Working directory inside the container
|
-w, --workdir="" Working directory inside the container
|
||||||
|
|
|
@ -21,11 +21,12 @@ weight=1
|
||||||
-c, --cpu-shares=0 CPU shares (relative weight)
|
-c, --cpu-shares=0 CPU shares (relative weight)
|
||||||
--cap-add=[] Add Linux capabilities
|
--cap-add=[] Add Linux capabilities
|
||||||
--cap-drop=[] Drop Linux capabilities
|
--cap-drop=[] Drop Linux capabilities
|
||||||
|
--cgroup-parent="" Optional parent cgroup for the container
|
||||||
--cidfile="" Write the container ID to the file
|
--cidfile="" Write the container ID to the file
|
||||||
|
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
|
||||||
|
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
|
||||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||||
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period
|
|
||||||
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota
|
|
||||||
-d, --detach=false Run container in background and print container ID
|
-d, --detach=false Run container in background and print container ID
|
||||||
--device=[] Add a host device to the container
|
--device=[] Add a host device to the container
|
||||||
--dns=[] Set custom DNS servers
|
--dns=[] Set custom DNS servers
|
||||||
|
@ -39,31 +40,32 @@ weight=1
|
||||||
--help=false Print usage
|
--help=false Print usage
|
||||||
-i, --interactive=false Keep STDIN open even if not attached
|
-i, --interactive=false Keep STDIN open even if not attached
|
||||||
--ipc="" IPC namespace to use
|
--ipc="" IPC namespace to use
|
||||||
|
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
|
||||||
|
--label-file=[] Read in a file of labels (EOL delimited)
|
||||||
--link=[] Add link to another container
|
--link=[] Add link to another container
|
||||||
--log-driver="" Logging driver for container
|
--log-driver="" Logging driver for container
|
||||||
--log-opt=[] Log driver specific options
|
--log-opt=[] Log driver specific options
|
||||||
--lxc-conf=[] Add custom lxc options
|
--lxc-conf=[] Add custom lxc options
|
||||||
-m, --memory="" Memory limit
|
-m, --memory="" Memory limit
|
||||||
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
|
|
||||||
--label-file=[] Read in a file of labels (EOL delimited)
|
|
||||||
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||||
--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.
|
||||||
--name="" Assign a name to the container
|
--name="" Assign a name to the container
|
||||||
--net="bridge" Set the Network mode for the container
|
--net="bridge" Set the Network mode for the container
|
||||||
--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
|
||||||
-P, --publish-all=false Publish all exposed ports to random ports
|
-P, --publish-all=false Publish all exposed ports to random ports
|
||||||
-p, --publish=[] Publish a container's port(s) to the host
|
-p, --publish=[] Publish a container's port(s) to the host
|
||||||
--pid="" PID namespace to use
|
--pid="" PID namespace to use
|
||||||
--uts="" UTS namespace to use
|
|
||||||
--privileged=false Give extended privileges to this container
|
--privileged=false Give extended privileges to this container
|
||||||
--read-only=false Mount the container's root filesystem as read only
|
--read-only=false Mount the container's root filesystem as read only
|
||||||
--restart="no" Restart policy (no, on-failure[:max-retry], always)
|
--restart="no" Restart policy (no, on-failure[:max-retry], always)
|
||||||
--rm=false Automatically remove the container when it exits
|
--rm=false Automatically remove the container when it exits
|
||||||
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
|
|
||||||
--security-opt=[] Security Options
|
--security-opt=[] Security Options
|
||||||
--sig-proxy=true Proxy received signals to the process
|
--sig-proxy=true Proxy received signals to the process
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>])
|
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>])
|
||||||
|
--ulimit=[] Ulimit options
|
||||||
|
--uts="" UTS namespace to use
|
||||||
-v, --volume=[] Bind mount a volume
|
-v, --volume=[] Bind mount a volume
|
||||||
--volumes-from=[] Mount volumes from the specified container(s)
|
--volumes-from=[] Mount volumes from the specified container(s)
|
||||||
-w, --workdir="" Working directory inside the container
|
-w, --workdir="" Working directory inside the container
|
||||||
|
|
|
@ -12,14 +12,15 @@ docker-create - Create a new container
|
||||||
[**-c**|**--cpu-shares**[=*0*]]
|
[**-c**|**--cpu-shares**[=*0*]]
|
||||||
[**--cap-add**[=*[]*]]
|
[**--cap-add**[=*[]*]]
|
||||||
[**--cap-drop**[=*[]*]]
|
[**--cap-drop**[=*[]*]]
|
||||||
|
[**--cgroup-parent**[=*CGROUP-PATH*]]
|
||||||
[**--cidfile**[=*CIDFILE*]]
|
[**--cidfile**[=*CIDFILE*]]
|
||||||
[**--cpu-period**[=*0*]]
|
[**--cpu-period**[=*0*]]
|
||||||
|
[**--cpu-quota**[=*0*]]
|
||||||
[**--cpuset-cpus**[=*CPUSET-CPUS*]]
|
[**--cpuset-cpus**[=*CPUSET-CPUS*]]
|
||||||
[**--cpuset-mems**[=*CPUSET-MEMS*]]
|
[**--cpuset-mems**[=*CPUSET-MEMS*]]
|
||||||
[**--cpu-quota**[=*0*]]
|
|
||||||
[**--device**[=*[]*]]
|
[**--device**[=*[]*]]
|
||||||
[**--dns-search**[=*[]*]]
|
|
||||||
[**--dns**[=*[]*]]
|
[**--dns**[=*[]*]]
|
||||||
|
[**--dns-search**[=*[]*]]
|
||||||
[**-e**|**--env**[=*[]*]]
|
[**-e**|**--env**[=*[]*]]
|
||||||
[**--entrypoint**[=*ENTRYPOINT*]]
|
[**--entrypoint**[=*ENTRYPOINT*]]
|
||||||
[**--env-file**[=*[]*]]
|
[**--env-file**[=*[]*]]
|
||||||
|
@ -32,30 +33,30 @@ docker-create - Create a new container
|
||||||
[**-l**|**--label**[=*[]*]]
|
[**-l**|**--label**[=*[]*]]
|
||||||
[**--label-file**[=*[]*]]
|
[**--label-file**[=*[]*]]
|
||||||
[**--link**[=*[]*]]
|
[**--link**[=*[]*]]
|
||||||
[**--lxc-conf**[=*[]*]]
|
|
||||||
[**--log-driver**[=*[]*]]
|
[**--log-driver**[=*[]*]]
|
||||||
[**--log-opt**[=*[]*]]
|
[**--log-opt**[=*[]*]]
|
||||||
|
[**--lxc-conf**[=*[]*]]
|
||||||
[**-m**|**--memory**[=*MEMORY*]]
|
[**-m**|**--memory**[=*MEMORY*]]
|
||||||
[**--memory-swap**[=*MEMORY-SWAP*]]
|
|
||||||
[**--mac-address**[=*MAC-ADDRESS*]]
|
[**--mac-address**[=*MAC-ADDRESS*]]
|
||||||
|
[**--memory-swap**[=*MEMORY-SWAP*]]
|
||||||
|
[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]]
|
||||||
[**--name**[=*NAME*]]
|
[**--name**[=*NAME*]]
|
||||||
[**--net**[=*"bridge"*]]
|
[**--net**[=*"bridge"*]]
|
||||||
[**--oom-kill-disable**[=*false*]]
|
[**--oom-kill-disable**[=*false*]]
|
||||||
[**-P**|**--publish-all**[=*false*]]
|
[**-P**|**--publish-all**[=*false*]]
|
||||||
[**-p**|**--publish**[=*[]*]]
|
[**-p**|**--publish**[=*[]*]]
|
||||||
[**--pid**[=*[]*]]
|
[**--pid**[=*[]*]]
|
||||||
[**--uts**[=*[]*]]
|
|
||||||
[**--privileged**[=*false*]]
|
[**--privileged**[=*false*]]
|
||||||
[**--read-only**[=*false*]]
|
[**--read-only**[=*false*]]
|
||||||
[**--restart**[=*RESTART*]]
|
[**--restart**[=*RESTART*]]
|
||||||
[**--security-opt**[=*[]*]]
|
[**--security-opt**[=*[]*]]
|
||||||
[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]]
|
|
||||||
[**-t**|**--tty**[=*false*]]
|
[**-t**|**--tty**[=*false*]]
|
||||||
[**-u**|**--user**[=*USER*]]
|
[**-u**|**--user**[=*USER*]]
|
||||||
|
[**--ulimit**[=*[]*]]
|
||||||
|
[**--uts**[=*[]*]]
|
||||||
[**-v**|**--volume**[=*[]*]]
|
[**-v**|**--volume**[=*[]*]]
|
||||||
[**--volumes-from**[=*[]*]]
|
[**--volumes-from**[=*[]*]]
|
||||||
[**-w**|**--workdir**[=*WORKDIR*]]
|
[**-w**|**--workdir**[=*WORKDIR*]]
|
||||||
[**--cgroup-parent**[=*CGROUP-PATH*]]
|
|
||||||
IMAGE [COMMAND] [ARG...]
|
IMAGE [COMMAND] [ARG...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
@ -239,6 +240,9 @@ This value should always larger than **-m**, so you should always use this with
|
||||||
**-u**, **--user**=""
|
**-u**, **--user**=""
|
||||||
Username or UID
|
Username or UID
|
||||||
|
|
||||||
|
**--ulimit**=[]
|
||||||
|
Ulimit options
|
||||||
|
|
||||||
**-v**, **--volume**=[]
|
**-v**, **--volume**=[]
|
||||||
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,16 @@ docker-run - Run a command in a new container
|
||||||
[**-c**|**--cpu-shares**[=*0*]]
|
[**-c**|**--cpu-shares**[=*0*]]
|
||||||
[**--cap-add**[=*[]*]]
|
[**--cap-add**[=*[]*]]
|
||||||
[**--cap-drop**[=*[]*]]
|
[**--cap-drop**[=*[]*]]
|
||||||
|
[**--cgroup-parent**[=*CGROUP-PATH*]]
|
||||||
[**--cidfile**[=*CIDFILE*]]
|
[**--cidfile**[=*CIDFILE*]]
|
||||||
[**--cpu-period**[=*0*]]
|
[**--cpu-period**[=*0*]]
|
||||||
|
[**--cpu-quota**[=*0*]]
|
||||||
[**--cpuset-cpus**[=*CPUSET-CPUS*]]
|
[**--cpuset-cpus**[=*CPUSET-CPUS*]]
|
||||||
[**--cpuset-mems**[=*CPUSET-MEMS*]]
|
[**--cpuset-mems**[=*CPUSET-MEMS*]]
|
||||||
[**-d**|**--detach**[=*false*]]
|
[**-d**|**--detach**[=*false*]]
|
||||||
[**--cpu-quota**[=*0*]]
|
|
||||||
[**--device**[=*[]*]]
|
[**--device**[=*[]*]]
|
||||||
[**--dns-search**[=*[]*]]
|
|
||||||
[**--dns**[=*[]*]]
|
[**--dns**[=*[]*]]
|
||||||
|
[**--dns-search**[=*[]*]]
|
||||||
[**-e**|**--env**[=*[]*]]
|
[**-e**|**--env**[=*[]*]]
|
||||||
[**--entrypoint**[=*ENTRYPOINT*]]
|
[**--entrypoint**[=*ENTRYPOINT*]]
|
||||||
[**--env-file**[=*[]*]]
|
[**--env-file**[=*[]*]]
|
||||||
|
@ -33,32 +34,32 @@ docker-run - Run a command in a new container
|
||||||
[**-l**|**--label**[=*[]*]]
|
[**-l**|**--label**[=*[]*]]
|
||||||
[**--label-file**[=*[]*]]
|
[**--label-file**[=*[]*]]
|
||||||
[**--link**[=*[]*]]
|
[**--link**[=*[]*]]
|
||||||
[**--lxc-conf**[=*[]*]]
|
|
||||||
[**--log-driver**[=*[]*]]
|
[**--log-driver**[=*[]*]]
|
||||||
[**--log-opt**[=*[]*]]
|
[**--log-opt**[=*[]*]]
|
||||||
|
[**--lxc-conf**[=*[]*]]
|
||||||
[**-m**|**--memory**[=*MEMORY*]]
|
[**-m**|**--memory**[=*MEMORY*]]
|
||||||
[**--memory-swap**[=*MEMORY-SWAP*]]
|
|
||||||
[**--mac-address**[=*MAC-ADDRESS*]]
|
[**--mac-address**[=*MAC-ADDRESS*]]
|
||||||
|
[**--memory-swap**[=*MEMORY-SWAP*]]
|
||||||
|
[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]]
|
||||||
[**--name**[=*NAME*]]
|
[**--name**[=*NAME*]]
|
||||||
[**--net**[=*"bridge"*]]
|
[**--net**[=*"bridge"*]]
|
||||||
[**--oom-kill-disable**[=*false*]]
|
[**--oom-kill-disable**[=*false*]]
|
||||||
[**-P**|**--publish-all**[=*false*]]
|
[**-P**|**--publish-all**[=*false*]]
|
||||||
[**-p**|**--publish**[=*[]*]]
|
[**-p**|**--publish**[=*[]*]]
|
||||||
[**--pid**[=*[]*]]
|
[**--pid**[=*[]*]]
|
||||||
[**--uts**[=*[]*]]
|
|
||||||
[**--privileged**[=*false*]]
|
[**--privileged**[=*false*]]
|
||||||
[**--read-only**[=*false*]]
|
[**--read-only**[=*false*]]
|
||||||
[**--restart**[=*RESTART*]]
|
[**--restart**[=*RESTART*]]
|
||||||
[**--rm**[=*false*]]
|
[**--rm**[=*false*]]
|
||||||
[**--security-opt**[=*[]*]]
|
[**--security-opt**[=*[]*]]
|
||||||
[**--sig-proxy**[=*true*]]
|
[**--sig-proxy**[=*true*]]
|
||||||
[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]]
|
|
||||||
[**-t**|**--tty**[=*false*]]
|
[**-t**|**--tty**[=*false*]]
|
||||||
[**-u**|**--user**[=*USER*]]
|
[**-u**|**--user**[=*USER*]]
|
||||||
[**-v**|**--volume**[=*[]*]]
|
[**-v**|**--volume**[=*[]*]]
|
||||||
|
[**--ulimit**[=*[]*]]
|
||||||
|
[**--uts**[=*[]*]]
|
||||||
[**--volumes-from**[=*[]*]]
|
[**--volumes-from**[=*[]*]]
|
||||||
[**-w**|**--workdir**[=*WORKDIR*]]
|
[**-w**|**--workdir**[=*WORKDIR*]]
|
||||||
[**--cgroup-parent**[=*CGROUP-PATH*]]
|
|
||||||
IMAGE [COMMAND] [ARG...]
|
IMAGE [COMMAND] [ARG...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
@ -397,6 +398,9 @@ standard input.
|
||||||
|
|
||||||
Without this argument the command will be run as root in the container.
|
Without this argument the command will be run as root in the container.
|
||||||
|
|
||||||
|
""--ulimit""=[]
|
||||||
|
Ulimit options
|
||||||
|
|
||||||
**-v**, **--volume**=[]
|
**-v**, **--volume**=[]
|
||||||
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue