Updated output from the docker cli help

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
master
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,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