mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Updated output from the docker cli help
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
This commit is contained in:
parent
4547b6d529
commit
cb6b196ab4
2 changed files with 61 additions and 43 deletions
|
@ -7,6 +7,7 @@ docker-create - Create a new container
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker create**
|
**docker create**
|
||||||
[**-a**|**--attach**[=*[]*]]
|
[**-a**|**--attach**[=*[]*]]
|
||||||
|
[**--add-host**[=*[]*]]
|
||||||
[**-c**|**--cpu-shares**[=*0*]]
|
[**-c**|**--cpu-shares**[=*0*]]
|
||||||
[**--cap-add**[=*[]*]]
|
[**--cap-add**[=*[]*]]
|
||||||
[**--cap-drop**[=*[]*]]
|
[**--cap-drop**[=*[]*]]
|
||||||
|
@ -29,6 +30,7 @@ docker-create - Create a new container
|
||||||
[**-P**|**--publish-all**[=*false*]]
|
[**-P**|**--publish-all**[=*false*]]
|
||||||
[**-p**|**--publish**[=*[]*]]
|
[**-p**|**--publish**[=*[]*]]
|
||||||
[**--privileged**[=*false*]]
|
[**--privileged**[=*false*]]
|
||||||
|
[**--restart**[=*RESTART*]]
|
||||||
[**-t**|**--tty**[=*false*]]
|
[**-t**|**--tty**[=*false*]]
|
||||||
[**-u**|**--user**[=*USER*]]
|
[**-u**|**--user**[=*USER*]]
|
||||||
[**-v**|**--volume**[=*[]*]]
|
[**-v**|**--volume**[=*[]*]]
|
||||||
|
@ -40,6 +42,9 @@ docker-create - Create a new container
|
||||||
**-a**, **--attach**=[]
|
**-a**, **--attach**=[]
|
||||||
Attach to STDIN, STDOUT or STDERR.
|
Attach to STDIN, STDOUT or STDERR.
|
||||||
|
|
||||||
|
**--add-host**=[]
|
||||||
|
Add a custom host-to-IP mapping (host:ip)
|
||||||
|
|
||||||
**-c**, **--cpu-shares**=0
|
**-c**, **--cpu-shares**=0
|
||||||
CPU shares (relative weight)
|
CPU shares (relative weight)
|
||||||
|
|
||||||
|
@ -106,12 +111,15 @@ docker-create - Create a new container
|
||||||
|
|
||||||
**-p**, **--publish**=[]
|
**-p**, **--publish**=[]
|
||||||
Publish a container's port to the host
|
Publish a container's port to the host
|
||||||
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
|
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
|
||||||
(use 'docker port' to see the actual mapping)
|
(use 'docker port' to see the actual mapping)
|
||||||
|
|
||||||
**--privileged**=*true*|*false*
|
**--privileged**=*true*|*false*
|
||||||
Give extended privileges to this container. The default is *false*.
|
Give extended privileges to this container. The default is *false*.
|
||||||
|
|
||||||
|
**--restart**=""
|
||||||
|
Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
||||||
|
|
||||||
**-t**, **--tty**=*true*|*false*
|
**-t**, **--tty**=*true*|*false*
|
||||||
Allocate a pseudo-TTY. The default is *false*.
|
Allocate a pseudo-TTY. The default is *false*.
|
||||||
|
|
||||||
|
@ -129,3 +137,4 @@ docker-create - Create a new container
|
||||||
|
|
||||||
# HISTORY
|
# HISTORY
|
||||||
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
September 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
|
|
@ -49,27 +49,30 @@ expect an integer, and they can only be specified once.
|
||||||
|
|
||||||
## daemon
|
## daemon
|
||||||
|
|
||||||
Usage of docker:
|
Usage: docker [OPTIONS] COMMAND [arg...]
|
||||||
|
|
||||||
|
A self-sufficient runtime for linux containers.
|
||||||
|
|
||||||
|
Options:
|
||||||
--api-enable-cors=false Enable CORS headers in the remote API
|
--api-enable-cors=false Enable CORS headers in the remote API
|
||||||
-b, --bridge="" Attach containers to a pre-existing network bridge
|
-b, --bridge="" Attach containers to a pre-existing network bridge
|
||||||
use 'none' to disable container networking
|
use 'none' to disable container networking
|
||||||
--bip="" Use this CIDR notation address for the network bridge's IP, not compatible with -b
|
--bip="" Use this CIDR notation address for the network bridge's IP, not compatible with -b
|
||||||
--fixed-cidr="" IPv4 subnet for fixed IPs (ex: 10.20.0.0/16)
|
|
||||||
this subnet must be nested in the bridge subnet (which is defined by -b or --bip)
|
|
||||||
-D, --debug=false Enable debug mode
|
-D, --debug=false Enable debug mode
|
||||||
-d, --daemon=false Enable daemon mode
|
-d, --daemon=false Enable daemon mode
|
||||||
--dns=[] Force Docker to use specific DNS servers
|
--dns=[] Force Docker to use specific DNS servers
|
||||||
--dns-search=[] Force Docker to use specific DNS search domains
|
--dns-search=[] Force Docker to use specific DNS search domains
|
||||||
-e, --exec-driver="native" Force the Docker runtime to use a specific exec driver
|
-e, --exec-driver="native" Force the Docker runtime to use a specific exec driver
|
||||||
|
--fixed-cidr="" IPv4 subnet for fixed IPs (ex: 10.20.0.0/16)
|
||||||
|
this subnet must be nested in the bridge subnet (which is defined by -b or --bip)
|
||||||
-G, --group="docker" Group to assign the unix socket specified by -H when running in daemon mode
|
-G, --group="docker" Group to assign the unix socket specified by -H when running in daemon mode
|
||||||
use '' (the empty string) to disable setting of a group
|
use '' (the empty string) to disable setting of a group
|
||||||
-g, --graph="/var/lib/docker" Path to use as the root of the Docker runtime
|
-g, --graph="/var/lib/docker" Path to use as the root of the Docker runtime
|
||||||
-H, --host=[] The socket(s) to bind to in daemon mode
|
-H, --host=[] The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.
|
||||||
specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.
|
|
||||||
--icc=true Enable inter-container communication
|
--icc=true Enable inter-container communication
|
||||||
--ip=0.0.0.0 Default IP address to use when binding container ports
|
--ip=0.0.0.0 Default IP address to use when binding container ports
|
||||||
--ip-forward=true Enable net.ipv4.ip_forward
|
--ip-forward=true Enable net.ipv4.ip_forward
|
||||||
--ip-masq=true Enable IP masquerading for bridge's IP range.
|
--ip-masq=true Enable IP masquerading for bridge's IP range
|
||||||
--iptables=true Enable Docker's addition of iptables rules
|
--iptables=true Enable Docker's addition of iptables rules
|
||||||
--mtu=0 Set the containers network MTU
|
--mtu=0 Set the containers network MTU
|
||||||
if no value is provided: default to the default route MTU or 1500 if no default route is available
|
if no value is provided: default to the default route MTU or 1500 if no default route is available
|
||||||
|
@ -85,6 +88,7 @@ expect an integer, and they can only be specified once.
|
||||||
--tlsverify=false Use TLS and verify the remote (daemon: verify client, client: verify daemon)
|
--tlsverify=false Use TLS and verify the remote (daemon: verify client, client: verify daemon)
|
||||||
-v, --version=false Print version information and quit
|
-v, --version=false Print version information and quit
|
||||||
|
|
||||||
|
|
||||||
Options with [] may be specified multiple times.
|
Options with [] may be specified multiple times.
|
||||||
|
|
||||||
The Docker daemon is the persistent process that manages containers.
|
The Docker daemon is the persistent process that manages containers.
|
||||||
|
@ -377,45 +381,50 @@ path. Paths are relative to the root of the filesystem.
|
||||||
|
|
||||||
Copy files/folders from the PATH to the HOSTPATH
|
Copy files/folders from the PATH to the HOSTPATH
|
||||||
|
|
||||||
|
|
||||||
## create
|
## create
|
||||||
|
|
||||||
Creates a new container.
|
Creates a new container.
|
||||||
|
|
||||||
Usage: docker create [OPTIONS] IMAGE[:TAG] [COMMAND] [ARG...]
|
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||||
|
|
||||||
|
Create a new container
|
||||||
|
|
||||||
-a, --attach=[] Attach to STDIN, STDOUT, STDERR.
|
-a, --attach=[] Attach to STDIN, STDOUT or STDERR.
|
||||||
-c, --cpu-shares=0 CPU shares (relative weight)
|
--add-host=[] Add a custom host-to-IP mapping (host:ip)
|
||||||
--cidfile="" Write the container ID to the file
|
-c, --cpu-shares=0 CPU shares (relative weight)
|
||||||
--dns=[] Set custom DNS servers
|
--cap-add=[] Add Linux capabilities
|
||||||
--dns-search=[] Set custom DNS search domains
|
--cap-drop=[] Drop Linux capabilities
|
||||||
-e, --env=[] Set environment variables
|
--cidfile="" Write the container ID to the file
|
||||||
--entrypoint="" Overwrite the default entrypoint of the image
|
--cpuset="" CPUs in which to allow execution (0-3, 0,1)
|
||||||
--env-file=[] Read in a line delimited file of environment variables
|
--device=[] Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
|
||||||
--expose=[] Expose a port from the container without publishing it to your host
|
--dns=[] Set custom DNS servers
|
||||||
-h, --hostname="" Container host name
|
--dns-search=[] Set custom DNS search domains
|
||||||
-i, --interactive=false Keep `STDIN` open even if not attached
|
-e, --env=[] Set environment variables
|
||||||
--link=[] Add link to another container (name:alias)
|
--entrypoint="" Overwrite the default ENTRYPOINT of the image
|
||||||
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
--env-file=[] Read in a line delimited file of environment variables
|
||||||
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
--expose=[] Expose a port from the container without publishing it to your host
|
||||||
--name="" Assign a name to the container
|
-h, --hostname="" Container host name
|
||||||
--net="bridge" Set the Network mode for the container
|
-i, --interactive=false Keep STDIN open even if not attached
|
||||||
'bridge': creates a new network stack for the container on the docker bridge
|
--link=[] Add link to another container in the form of name:alias
|
||||||
'none': no networking for this container
|
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
||||||
'container:<name|id>': reuses another container network stack
|
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
||||||
'host': use the host network stack inside the container
|
--name="" Assign a name to the container
|
||||||
-p, --publish=[] Publish a container's port to the host
|
--net="bridge" Set the Network mode for the container
|
||||||
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
|
'bridge': creates a new network stack for the container on the docker bridge
|
||||||
(use 'docker port' to see the actual mapping)
|
'none': no networking for this container
|
||||||
-P, --publish-all=false Publish all exposed ports to the host interfaces
|
'container:<name|id>': reuses another container network stack
|
||||||
--privileged=false Give extended privileges to this container
|
'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.
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-P, --publish-all=false Publish all exposed ports to the host interfaces
|
||||||
-u, --user="" Username or UID
|
-p, --publish=[] Publish a container's port to the host
|
||||||
-v, --volume=[] Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)
|
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
|
||||||
--volumes-from=[] Mount volumes from the specified container(s)
|
(use 'docker port' to see the actual mapping)
|
||||||
-w, --workdir="" Working directory inside the container
|
--privileged=false Give extended privileges to this container
|
||||||
|
--restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
||||||
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
|
-u, --user="" Username or UID
|
||||||
|
-v, --volume=[] Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
||||||
|
--volumes-from=[] Mount volumes from the specified container(s)
|
||||||
|
-w, --workdir="" Working directory inside the container
|
||||||
|
|
||||||
The `docker create` command creates a writeable container layer over
|
The `docker create` command creates a writeable container layer over
|
||||||
the specified image and prepares it for running the specified command.
|
the specified image and prepares it for running the specified command.
|
||||||
|
@ -509,11 +518,11 @@ You'll need two shells for this example.
|
||||||
|
|
||||||
## exec
|
## exec
|
||||||
|
|
||||||
Usage: docker exec CONTAINER COMMAND [ARG...]
|
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
|
||||||
|
|
||||||
Run a command in an existing container
|
Run a command in an existing container
|
||||||
|
|
||||||
-d, --detach=false Detached mode: run the process in the background and exit
|
-d, --detach=false Detached mode: run command in the background
|
||||||
-i, --interactive=false Keep STDIN open even if not attached
|
-i, --interactive=false Keep STDIN open even if not attached
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
|
|
||||||
|
@ -1086,7 +1095,7 @@ removed before the image is removed.
|
||||||
--cap-drop=[] Drop Linux capabilities
|
--cap-drop=[] Drop Linux capabilities
|
||||||
--cidfile="" Write the container ID to the file
|
--cidfile="" Write the container ID to the file
|
||||||
--cpuset="" CPUs in which to allow execution (0-3, 0,1)
|
--cpuset="" CPUs in which to allow execution (0-3, 0,1)
|
||||||
-d, --detach=false Detached mode: run container in the background and print new container ID
|
-d, --detach=false Detached mode: run the container in the background and print the new container ID
|
||||||
--device=[] Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
|
--device=[] Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
|
||||||
--dns=[] Set custom DNS servers
|
--dns=[] Set custom DNS servers
|
||||||
--dns-search=[] Set custom DNS search domains
|
--dns-search=[] Set custom DNS search domains
|
||||||
|
|
Loading…
Reference in a new issue