Ver código fonte

Merge pull request #7176 from SvenDowideit/auto-update-master-cli-docs

user facing documentation changes in master atm
Fred Lifton 11 anos atrás
pai
commit
be3aa1eba0

+ 6 - 2
docs/docs-update.py

@@ -7,6 +7,7 @@
 #       ./docs/update.py /usr/bin/docker
 #       ./docs/update.py /usr/bin/docker
 #
 #
 
 
+import datetime
 import re
 import re
 from sys import argv
 from sys import argv
 import subprocess
 import subprocess
@@ -15,6 +16,9 @@ import os.path
 
 
 script, docker_cmd = argv
 script, docker_cmd = argv
 
 
+# date "+%B %Y"
+date_string = datetime.date.today().strftime('%B %Y')
+
 def print_usage(outtext, docker_cmd, command):
 def print_usage(outtext, docker_cmd, command):
     help = ""
     help = ""
     try:
     try:
@@ -204,9 +208,9 @@ def update_man_pages():
         outtext.write("# HISTORY\n")
         outtext.write("# HISTORY\n")
         if history != "":
         if history != "":
            outtext.write(history+"\n")
            outtext.write(history+"\n")
-        recent_history_re = re.compile(".*June 2014.*", re.MULTILINE|re.DOTALL)
+        recent_history_re = re.compile(".*"+date_string+".*", re.MULTILINE|re.DOTALL)
         if not recent_history_re.match(history):
         if not recent_history_re.match(history):
-            outtext.write("June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>\n")
+            outtext.write(date_string+", updated by Sven Dowideit <SvenDowideit@home.org.au>\n")
         outtext.close()
         outtext.close()
 
 
 # main
 # main

+ 4 - 2
docs/man/docker-commit.1.md

@@ -8,6 +8,7 @@ docker-commit - Create a new image from a container's changes
 **docker commit**
 **docker commit**
 [**-a**|**--author**[=*AUTHOR*]]
 [**-a**|**--author**[=*AUTHOR*]]
 [**-m**|**--message**[=*MESSAGE*]]
 [**-m**|**--message**[=*MESSAGE*]]
+[**-p**|**--pause**[=*true*]]
  CONTAINER [REPOSITORY[:TAG]]
  CONTAINER [REPOSITORY[:TAG]]
 
 
 # DESCRIPTION
 # DESCRIPTION
@@ -20,8 +21,8 @@ Using an existing container's name or ID you can create a new image.
 **-m**, **--message**=""
 **-m**, **--message**=""
    Commit message
    Commit message
 
 
-**-p, --pause**=true
-   Pause container during commit
+**-p**, **--pause**=*true*|*false*
+   Pause container during commit. The default is *true*.
 
 
 # EXAMPLES
 # EXAMPLES
 
 
@@ -37,3 +38,4 @@ create a new image run docker ps to find the container's ID and then run:
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 based on docker.com source material and in
 based on docker.com source material and in
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
+July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>

+ 9 - 5
docs/man/docker-logout.1.md

@@ -1,18 +1,22 @@
 % DOCKER(1) Docker User Manuals
 % DOCKER(1) Docker User Manuals
-% Daniel, Dao Quang Minh
+% Docker Community
 % JUNE 2014
 % JUNE 2014
 # NAME
 # NAME
-docker-logout - Log out from a Docker registry
+docker-logout - Log out from a Docker registry, if no server is specified "https://index.docker.io/v1/" is the default.
 
 
 # SYNOPSIS
 # SYNOPSIS
-**docker logout** [SERVER]
+**docker logout**
+[SERVER]
 
 
 # DESCRIPTION
 # DESCRIPTION
 Log the user out from a Docker registry, if no server is
 Log the user out from a Docker registry, if no server is
 specified "https://index.docker.io/v1/" is the default. If you want to
 specified "https://index.docker.io/v1/" is the default. If you want to
 log out from a private registry you can specify this by adding the server name.
 log out from a private registry you can specify this by adding the server name.
 
 
-# EXAMPLE
+# OPTIONS
+There are no available options.
+
+# EXAMPLES
 
 
 ## Log out from a local registry
 ## Log out from a local registry
 
 
@@ -20,4 +24,4 @@ log out from a private registry you can specify this by adding the server name.
 
 
 # HISTORY
 # HISTORY
 June 2014, Originally compiled by Daniel, Dao Quang Minh (daniel at nitrous dot io)
 June 2014, Originally compiled by Daniel, Dao Quang Minh (daniel at nitrous dot io)
-
+July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>

+ 5 - 0
docs/man/docker-logs.1.md

@@ -8,6 +8,7 @@ docker-logs - Fetch the logs of a container
 **docker logs**
 **docker logs**
 [**-f**|**--follow**[=*false*]]
 [**-f**|**--follow**[=*false*]]
 [**-t**|**--timestamps**[=*false*]]
 [**-t**|**--timestamps**[=*false*]]
+[**--tail**[=*"all"*]]
 CONTAINER
 CONTAINER
 
 
 # DESCRIPTION
 # DESCRIPTION
@@ -27,7 +28,11 @@ then continue streaming new output from the container’s stdout and stderr.
 **-t**, **--timestamps**=*true*|*false*
 **-t**, **--timestamps**=*true*|*false*
    Show timestamps. The default is *false*.
    Show timestamps. The default is *false*.
 
 
+**--tail**="all"
+   Output the specified number of lines at the end of logs (defaults to all logs)
+
 # HISTORY
 # HISTORY
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 based on docker.com source material and internal work.
 based on docker.com source material and internal work.
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
+July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>

+ 6 - 5
docs/man/docker-rm.1.md

@@ -6,9 +6,9 @@ docker-rm - Remove one or more containers
 
 
 # SYNOPSIS
 # SYNOPSIS
 **docker rm**
 **docker rm**
-[**-s**|**--stop**[=*false*]]
 [**-k**|**--kill**[=*false*]]
 [**-k**|**--kill**[=*false*]]
 [**-l**|**--link**[=*false*]]
 [**-l**|**--link**[=*false*]]
+[**-s**|**--stop**[=*false*]]
 [**-v**|**--volumes**[=*false*]]
 [**-v**|**--volumes**[=*false*]]
  CONTAINER [CONTAINER...]
  CONTAINER [CONTAINER...]
 
 
@@ -20,15 +20,15 @@ remove a running container unless you use the \fB-f\fR option. To see all
 containers on a host use the **docker ps -a** command.
 containers on a host use the **docker ps -a** command.
 
 
 # OPTIONS
 # OPTIONS
-**-s**, **--stop**=*true*|*false*
-   Stop then remove a running container. The default is *false*.
-
 **-k**, **--kill**=*true*|*false*
 **-k**, **--kill**=*true*|*false*
-   Kill then remove a running container. The default is *false*.
+   Kill and remove a running container. The default is *false*.
 
 
 **-l**, **--link**=*true*|*false*
 **-l**, **--link**=*true*|*false*
    Remove the specified link and not the underlying container. The default is *false*.
    Remove the specified link and not the underlying container. The default is *false*.
 
 
+**-s**, **--stop**=*true*|*false*
+   Stop and remove a running container. The default is *false*.
+
 **-v**, **--volumes**=*true*|*false*
 **-v**, **--volumes**=*true*|*false*
    Remove the volumes associated with the container. The default is *false*.
    Remove the volumes associated with the container. The default is *false*.
 
 
@@ -53,3 +53,4 @@ command. The use that name as follows:
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 based on docker.com source material and internal work.
 based on docker.com source material and internal work.
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
+July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>

+ 24 - 15
docs/man/docker-run.1.md

@@ -8,9 +8,12 @@ docker-run - Run a command in a new container
 **docker run**
 **docker run**
 [**-a**|**--attach**[=*[]*]]
 [**-a**|**--attach**[=*[]*]]
 [**-c**|**--cpu-shares**[=*0*]]
 [**-c**|**--cpu-shares**[=*0*]]
+[**--cap-add**[=*[]*]]
+[**--cap-drop**[=*[]*]]
 [**--cidfile**[=*CIDFILE*]]
 [**--cidfile**[=*CIDFILE*]]
 [**--cpuset**[=*CPUSET*]]
 [**--cpuset**[=*CPUSET*]]
 [**-d**|**--detach**[=*false*]]
 [**-d**|**--detach**[=*false*]]
+[**--device**[=*[]*]]
 [**--dns-search**[=*[]*]]
 [**--dns-search**[=*[]*]]
 [**--dns**[=*[]*]]
 [**--dns**[=*[]*]]
 [**-e**|**--env**[=*[]*]]
 [**-e**|**--env**[=*[]*]]
@@ -34,7 +37,7 @@ docker-run - Run a command in a new container
 [**-v**|**--volume**[=*[]*]]
 [**-v**|**--volume**[=*[]*]]
 [**--volumes-from**[=*[]*]]
 [**--volumes-from**[=*[]*]]
 [**-w**|**--workdir**[=*WORKDIR*]]
 [**-w**|**--workdir**[=*WORKDIR*]]
- IMAGE[:TAG] [COMMAND] [ARG...]
+ IMAGE [COMMAND] [ARG...]
 
 
 # DESCRIPTION
 # DESCRIPTION
 
 
@@ -67,8 +70,14 @@ the same proportion of CPU cycles, but you can tell the kernel to give more
 shares of CPU time to one or more containers when you start them via **docker
 shares of CPU time to one or more containers when you start them via **docker
 run**.
 run**.
 
 
-**--cidfile**=*file*
-   Write the container ID to the file specified.
+**--cap-add**=[]
+   Add Linux capabilities
+
+**--cap-drop**=[]
+   Drop Linux capabilities
+
+**--cidfile**=""
+   Write the container ID to the file
 
 
 **--cpuset**=""
 **--cpuset**=""
    CPUs in which to allow execution (0-3, 0,1)
    CPUs in which to allow execution (0-3, 0,1)
@@ -82,9 +91,11 @@ the detached mode, then you cannot use the **-rm** option.
 
 
    When attached in the tty mode, you can detach from a running container without
    When attached in the tty mode, you can detach from a running container without
 stopping the process by pressing the keys CTRL-P CTRL-Q.
 stopping the process by pressing the keys CTRL-P CTRL-Q.
+**--device**=[]
+   Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
 
 
 **--dns-search**=[]
 **--dns-search**=[]
-   Set custom dns search domains
+   Set custom DNS search domains
 
 
 **--dns**=*IP-address*
 **--dns**=*IP-address*
    Set custom DNS servers. This option can be used to override the DNS
    Set custom DNS servers. This option can be used to override the DNS
@@ -92,6 +103,8 @@ configuration passed to the container. Typically this is necessary when the
 host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this
 host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this
 is the case the **-dns** flags is necessary for every run.
 is the case the **-dns** flags is necessary for every run.
 
 
+**-e**, **--env**=[]
+   Set environment variables
 
 
 **-e**, **-env**=*environment*
 **-e**, **-env**=*environment*
    Set environment variables. This option allows you to specify arbitrary
    Set environment variables. This option allows you to specify arbitrary
@@ -111,7 +124,7 @@ something else inside the container, so you can override the default ENTRYPOINT
 at runtime by using a **--entrypoint** and a string to specify the new
 at runtime by using a **--entrypoint** and a string to specify the new
 ENTRYPOINT.
 ENTRYPOINT.
 **--env-file**=[]
 **--env-file**=[]
-   Read in a line delimited file of ENV variables
+   Read in a line delimited file of environment variables
 
 
 **--expose**=*port*
 **--expose**=*port*
    Expose a port from the container without publishing it to your host. A
    Expose a port from the container without publishing it to your host. A
@@ -190,23 +203,18 @@ outside of a container on the host.
 
 
 
 
 **--rm**=*true*|*false*
 **--rm**=*true*|*false*
-   If set to *true* the container is automatically removed when it exits. The
-default is *false*. This option is incompatible with **-d**.
-
+   Automatically remove the container when it exits (incompatible with -d). The default is *false*.
 
 
 **--sig-proxy**=*true*|*false*
 **--sig-proxy**=*true*|*false*
-   When set to true, proxy received signals to the process (even in
-non-tty mode). SIGCHLD, SIGKILL, and SIGSTOP are not proxied. The default is *true*.
+   Proxy received signals to the process (even in non-TTY mode). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*.
 
 
-
-**-t**, **-tty**=*true*|*false*
+**-t**, **--tty**=*true*|*false*
    When set to true Docker can allocate a pseudo-tty and attach to the standard
    When set to true Docker can allocate a pseudo-tty and attach to the standard
 input of any container. This can be used, for example, to run a throwaway
 input of any container. This can be used, for example, to run a throwaway
 interactive shell. The default is value is false.
 interactive shell. The default is value is false.
 
 
-
-**-u**, **-user**=*username*,*uid*
-   Set a username or UID for the container.
+**-u**, **--user**=""
+   Username or UID
 
 
 
 
 **-v**, **-volume**=*volume*[:ro|:rw]
 **-v**, **-volume**=*volume*[:ro|:rw]
@@ -374,3 +382,4 @@ changes will also be reflected on the host in /var/db.
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 based on docker.com source material and internal work.
 based on docker.com source material and internal work.
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
+July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>

+ 2 - 1
docs/man/docker-tag.1.md

@@ -7,7 +7,7 @@ docker-tag - Tag an image into a repository
 # SYNOPSIS
 # SYNOPSIS
 **docker tag**
 **docker tag**
 [**-f**|**--force**[=*false*]]
 [**-f**|**--force**[=*false*]]
- IMAGE [REGISTRYHOST/][USERNAME/]NAME[:TAG]
+ IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
 
 
 # DESCRIPTION
 # DESCRIPTION
 This will give a new alias to an image in the repository. This refers to the
 This will give a new alias to an image in the repository. This refers to the
@@ -56,3 +56,4 @@ registry you must tag it with the registry hostname and port (if needed).
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 April 2014, Originally compiled by William Henry (whenry at redhat dot com)
 based on docker.com source material and internal work.
 based on docker.com source material and internal work.
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
+July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>

+ 18 - 15
docs/sources/reference/commandline/cli.md

@@ -738,7 +738,8 @@ specify this by adding the server name.
 
 
     Log out from a Docker registry, if no server is specified "https://index.docker.io/v1/" is the default.
     Log out from a Docker registry, if no server is specified "https://index.docker.io/v1/" is the default.
 
 
-    example:
+For example:
+
     $ docker logout localhost:8080
     $ docker logout localhost:8080
 
 
 ## logs
 ## logs
@@ -953,20 +954,23 @@ removed before the image is removed.
 
 
     Run a command in a new container
     Run a command in a new container
 
 
-      -a, --attach=[]            Attach to stdin, stdout or stderr.
+      -a, --attach=[]            Attach to STDIN, STDOUT or STDERR.
       -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)
       --cpuset=""                CPUs in which to allow execution (0-3, 0,1)
-      -d, --detach=false         Detached mode: Run container in the background, print new container id
-      --dns=[]                   Set custom dns servers
-      --dns-search=[]            Set custom dns search domains
+      -d, --detach=false         Detached mode: run container in the background and print new container ID
+      --device=[]                Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc)
+      --dns=[]                   Set custom DNS servers
+      --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
-      --env-file=[]              Read in a line delimited file of ENV variables
+      --entrypoint=""            Overwrite the default ENTRYPOINT of the image
+      --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
-      --link=[]                  Add link to another container (name:alias)
+      -i, --interactive=false    Keep STDIN open even if not attached
+      --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
@@ -981,12 +985,11 @@ removed before the image is removed.
                                    (use 'docker port' to see the actual mapping)
                                    (use 'docker port' to see the actual mapping)
       --privileged=false         Give extended privileges to this container
       --privileged=false         Give extended privileges to this container
       --rm=false                 Automatically remove the container when it exits (incompatible with -d)
       --rm=false                 Automatically remove the container when it exits (incompatible with -d)
-      --sig-proxy=true           Proxy received signals to the process (even in non-tty mode). SIGCHLD, SIGKILL, and SIGSTOP are not proxied.
-      -t, --tty=false            Allocate a pseudo-tty
+      --sig-proxy=true           Proxy received signals to the process (even in non-TTY mode). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.
+      -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)
-      --device=[]                Add a host device to the container (e.g. --device=/dev/sdc[:/dev/xvdc[:rwm]])
       -w, --workdir=""           Working directory inside the container
       -w, --workdir=""           Working directory inside the container
 
 
 The `docker run` command first `creates` a writeable container layer over the
 The `docker run` command first `creates` a writeable container layer over the
@@ -1272,7 +1275,7 @@ grace period, SIGKILL
 
 
 ## tag
 ## tag
 
 
-    Usage: docker tag [OPTIONS] IMAGE [REGISTRYHOST/][USERNAME/]NAME[:TAG]
+    Usage: docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
 
 
     Tag an image into a repository
     Tag an image into a repository
 
 
@@ -1292,7 +1295,7 @@ them to [*Share Images via Repositories*](
 
 
     Usage: docker unpause CONTAINER
     Usage: docker unpause CONTAINER
 
 
-    Resumes a paused container.
+    Unpause all processes within a container
 
 
 The `docker unpause` command uses the cgroups freezer to un-suspend all
 The `docker unpause` command uses the cgroups freezer to un-suspend all
 processes in a container.
 processes in a container.