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:
SvenDowideit 2014-09-25 16:07:55 +10:00 committed by Tibor Vass
parent 82ff6f0c9f
commit 5c9bb30d90
1 changed files with 51 additions and 42 deletions

View File

@ -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,26 +381,31 @@ 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.
--add-host=[] Add a custom host-to-IP mapping (host:ip)
-c, --cpu-shares=0 CPU shares (relative weight) -c, --cpu-shares=0 CPU shares (relative weight)
--cap-add=[] Add 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)
--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
-e, --env=[] Set environment variables -e, --env=[] Set environment variables
--entrypoint="" Overwrite the default entrypoint of the image --entrypoint="" Overwrite the default ENTRYPOINT of the image
--env-file=[] Read in a line delimited file of environment variables --env-file=[] Read in a line delimited file of environment variables
--expose=[] Expose a port from the container without publishing it to your host --expose=[] Expose a port from the container without publishing it to your host
-h, --hostname="" Container host name -h, --hostname="" Container host name
-i, --interactive=false Keep `STDIN` open even if not attached -i, --interactive=false Keep STDIN open even if not attached
--link=[] Add link to another container (name:alias) --link=[] Add link to another container in the form of name:alias
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" --lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g) -m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
--name="" Assign a name to the container --name="" Assign a name to the container
@ -404,19 +413,19 @@ Creates a new container.
'bridge': creates a new network stack for the container on the docker bridge 'bridge': creates a new network stack for the container on the docker bridge
'none': no networking for this container 'none': no networking for this container
'container:<name|id>': reuses another container network stack 'container:<name|id>': reuses another container network stack
'host': use the host network stack inside the 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.
-p, --publish=[] Publish a container's port to the host
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
(use 'docker port' to see the actual mapping)
-P, --publish-all=false Publish all exposed ports to the host interfaces -P, --publish-all=false Publish all exposed ports to the host interfaces
-p, --publish=[] Publish a container's port to the host
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
(use 'docker port' to see the actual mapping)
--privileged=false Give extended privileges to this 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 -t, --tty=false Allocate a pseudo-TTY
-u, --user="" Username or UID -u, --user="" Username or UID
-v, --volume=[] Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container) -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) --volumes-from=[] Mount volumes from the specified container(s)
-w, --workdir="" Working directory inside the container -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.
The container ID is then printed to `STDOUT`. The container ID is then printed to `STDOUT`.
@ -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