Browse code

Updated output from the docker cli help

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)

SvenDowideit authored on 2014/09/25 15:07:55
Showing 2 changed files
... ...
@@ -7,6 +7,7 @@ docker-create - Create a new container
7 7
 # SYNOPSIS
8 8
 **docker create**
9 9
 [**-a**|**--attach**[=*[]*]]
10
+[**--add-host**[=*[]*]]
10 11
 [**-c**|**--cpu-shares**[=*0*]]
11 12
 [**--cap-add**[=*[]*]]
12 13
 [**--cap-drop**[=*[]*]]
... ...
@@ -29,6 +30,7 @@ docker-create - Create a new container
29 29
 [**-P**|**--publish-all**[=*false*]]
30 30
 [**-p**|**--publish**[=*[]*]]
31 31
 [**--privileged**[=*false*]]
32
+[**--restart**[=*RESTART*]]
32 33
 [**-t**|**--tty**[=*false*]]
33 34
 [**-u**|**--user**[=*USER*]]
34 35
 [**-v**|**--volume**[=*[]*]]
... ...
@@ -40,6 +42,9 @@ docker-create - Create a new container
40 40
 **-a**, **--attach**=[]
41 41
    Attach to STDIN, STDOUT or STDERR.
42 42
 
43
+**--add-host**=[]
44
+   Add a custom host-to-IP mapping (host:ip)
45
+
43 46
 **-c**, **--cpu-shares**=0
44 47
    CPU shares (relative weight)
45 48
 
... ...
@@ -106,12 +111,15 @@ docker-create - Create a new container
106 106
 
107 107
 **-p**, **--publish**=[]
108 108
    Publish a container's port to the host
109
-                               format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
109
+                               format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
110 110
                                (use 'docker port' to see the actual mapping)
111 111
 
112 112
 **--privileged**=*true*|*false*
113 113
    Give extended privileges to this container. The default is *false*.
114 114
 
115
+**--restart**=""
116
+   Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
117
+
115 118
 **-t**, **--tty**=*true*|*false*
116 119
    Allocate a pseudo-TTY. The default is *false*.
117 120
 
... ...
@@ -129,3 +137,4 @@ docker-create - Create a new container
129 129
 
130 130
 # HISTORY
131 131
 August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
132
+September 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
... ...
@@ -49,27 +49,30 @@ expect an integer, and they can only be specified once.
49 49
 
50 50
 ## daemon
51 51
 
52
-    Usage of docker:
52
+    Usage: docker [OPTIONS] COMMAND [arg...]
53
+
54
+    A self-sufficient runtime for linux containers.
55
+
56
+    Options:
53 57
       --api-enable-cors=false                    Enable CORS headers in the remote API
54 58
       -b, --bridge=""                            Attach containers to a pre-existing network bridge
55 59
                                                    use 'none' to disable container networking
56 60
       --bip=""                                   Use this CIDR notation address for the network bridge's IP, not compatible with -b
57
-      --fixed-cidr=""                            IPv4 subnet for fixed IPs (ex: 10.20.0.0/16)
58
-                                                   this subnet must be nested in the bridge subnet (which is defined by -b or --bip)
59 61
       -D, --debug=false                          Enable debug mode
60 62
       -d, --daemon=false                         Enable daemon mode
61 63
       --dns=[]                                   Force Docker to use specific DNS servers
62 64
       --dns-search=[]                            Force Docker to use specific DNS search domains
63 65
       -e, --exec-driver="native"                 Force the Docker runtime to use a specific exec driver
66
+      --fixed-cidr=""                            IPv4 subnet for fixed IPs (ex: 10.20.0.0/16)
67
+                                                   this subnet must be nested in the bridge subnet (which is defined by -b or --bip)
64 68
       -G, --group="docker"                       Group to assign the unix socket specified by -H when running in daemon mode
65 69
                                                    use '' (the empty string) to disable setting of a group
66 70
       -g, --graph="/var/lib/docker"              Path to use as the root of the Docker runtime
67
-      -H, --host=[]                              The socket(s) to bind to in daemon mode
68
-                                                   specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.
71
+      -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.
69 72
       --icc=true                                 Enable inter-container communication
70 73
       --ip=0.0.0.0                               Default IP address to use when binding container ports
71 74
       --ip-forward=true                          Enable net.ipv4.ip_forward
72
-      --ip-masq=true                             Enable IP masquerading for bridge's IP range.
75
+      --ip-masq=true                             Enable IP masquerading for bridge's IP range
73 76
       --iptables=true                            Enable Docker's addition of iptables rules
74 77
       --mtu=0                                    Set the containers network MTU
75 78
                                                    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.
85 85
       --tlsverify=false                          Use TLS and verify the remote (daemon: verify client, client: verify daemon)
86 86
       -v, --version=false                        Print version information and quit
87 87
 
88
+
88 89
 Options with [] may be specified multiple times.
89 90
 
90 91
 The Docker daemon is the persistent process that manages containers.
... ...
@@ -377,45 +381,50 @@ path.  Paths are relative to the root of the filesystem.
377 377
 
378 378
     Copy files/folders from the PATH to the HOSTPATH
379 379
 
380
-
381 380
 ## create
382 381
 
383 382
 Creates a new container.
384 383
 
385
-    Usage: docker create [OPTIONS] IMAGE[:TAG] [COMMAND] [ARG...]
386
-
387
-
388
-    -a, --attach=[]            Attach to STDIN, STDOUT, STDERR.
389
-    -c, --cpu-shares=0         CPU shares (relative weight)
390
-    --cidfile=""               Write the container ID to the file
391
-    --dns=[]                   Set custom DNS servers
392
-    --dns-search=[]            Set custom DNS search domains
393
-    -e, --env=[]               Set environment variables
394
-    --entrypoint=""            Overwrite the default entrypoint of the image
395
-    --env-file=[]              Read in a line delimited file of environment variables
396
-    --expose=[]                Expose a port from the container without publishing it to your host
397
-    -h, --hostname=""          Container host name
398
-    -i, --interactive=false    Keep `STDIN` open even if not attached
399
-    --link=[]                  Add link to another container (name:alias)
400
-    --lxc-conf=[]              (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
401
-    -m, --memory=""            Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
402
-    --name=""                  Assign a name to the container
403
-    --net="bridge"             Set the Network mode for the container
404
-                                 'bridge': creates a new network stack for the container on the docker bridge
405
-                                 'none': no networking for this container
406
-                                 'container:<name|id>': reuses another container network stack
407
-                                 'host': use the host network stack inside the container
408
-    -p, --publish=[]           Publish a container's port to the host
409
-                                 format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
410
-                                 (use 'docker port' to see the actual mapping)
411
-    -P, --publish-all=false    Publish all exposed ports to the host interfaces
412
-    --privileged=false         Give extended privileges to this container
413
-    -t, --tty=false            Allocate a pseudo-TTY
414
-    -u, --user=""              Username or UID
415
-    -v, --volume=[]            Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)
416
-    --volumes-from=[]          Mount volumes from the specified container(s)
417
-    -w, --workdir=""           Working directory inside the container
384
+    Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
385
+
386
+    Create a new container
418 387
 
388
+      -a, --attach=[]            Attach to STDIN, STDOUT or STDERR.
389
+      --add-host=[]              Add a custom host-to-IP mapping (host:ip)
390
+      -c, --cpu-shares=0         CPU shares (relative weight)
391
+      --cap-add=[]               Add Linux capabilities
392
+      --cap-drop=[]              Drop Linux capabilities
393
+      --cidfile=""               Write the container ID to the file
394
+      --cpuset=""                CPUs in which to allow execution (0-3, 0,1)
395
+      --device=[]                Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
396
+      --dns=[]                   Set custom DNS servers
397
+      --dns-search=[]            Set custom DNS search domains
398
+      -e, --env=[]               Set environment variables
399
+      --entrypoint=""            Overwrite the default ENTRYPOINT of the image
400
+      --env-file=[]              Read in a line delimited file of environment variables
401
+      --expose=[]                Expose a port from the container without publishing it to your host
402
+      -h, --hostname=""          Container host name
403
+      -i, --interactive=false    Keep STDIN open even if not attached
404
+      --link=[]                  Add link to another container in the form of name:alias
405
+      --lxc-conf=[]              (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
406
+      -m, --memory=""            Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
407
+      --name=""                  Assign a name to the container
408
+      --net="bridge"             Set the Network mode for the container
409
+                                   'bridge': creates a new network stack for the container on the docker bridge
410
+                                   'none': no networking for this container
411
+                                   'container:<name|id>': reuses another container network stack
412
+                                   '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.
413
+      -P, --publish-all=false    Publish all exposed ports to the host interfaces
414
+      -p, --publish=[]           Publish a container's port to the host
415
+                                   format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
416
+                                   (use 'docker port' to see the actual mapping)
417
+      --privileged=false         Give extended privileges to this container
418
+      --restart=""               Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
419
+      -t, --tty=false            Allocate a pseudo-TTY
420
+      -u, --user=""              Username or UID
421
+      -v, --volume=[]            Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
422
+      --volumes-from=[]          Mount volumes from the specified container(s)
423
+      -w, --workdir=""           Working directory inside the container
419 424
 
420 425
 The `docker create` command creates a writeable container layer over
421 426
 the specified image and prepares it for running the specified command.
... ...
@@ -509,11 +518,11 @@ You'll need two shells for this example.
509 509
 
510 510
 ## exec
511 511
 
512
-    Usage: docker exec CONTAINER COMMAND [ARG...]
512
+    Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
513 513
 
514 514
     Run a command in an existing container
515 515
 
516
-      -d, --detach=false         Detached mode: run the process in the background and exit
516
+      -d, --detach=false         Detached mode: run command in the background
517 517
       -i, --interactive=false    Keep STDIN open even if not attached
518 518
       -t, --tty=false            Allocate a pseudo-TTY
519 519
 
... ...
@@ -1086,7 +1095,7 @@ removed before the image is removed.
1086 1086
       --cap-drop=[]              Drop Linux capabilities
1087 1087
       --cidfile=""               Write the container ID to the file
1088 1088
       --cpuset=""                CPUs in which to allow execution (0-3, 0,1)
1089
-      -d, --detach=false         Detached mode: run container in the background and print new container ID
1089
+      -d, --detach=false         Detached mode: run the container in the background and print the new container ID
1090 1090
       --device=[]                Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
1091 1091
       --dns=[]                   Set custom DNS servers
1092 1092
       --dns-search=[]            Set custom DNS search domains