From 0a0dd1163294bfa92f37c41289e697f0ee4d9747 Mon Sep 17 00:00:00 2001 From: William Henry Date: Wed, 16 Apr 2014 12:07:55 -0600 Subject: [PATCH 1/9] Created all manual pages in Markdown. Container for conversion. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) All Docker commands have a Markdown page. Dockerfile used to build a Fedora based pandoc container. md2man-all.sh is used inside the container. README.sh includes an explaination on how to build the fedora/pandoc image and how to run the container directly. Changes to be committed: new file: contrib/man/md/Dockerfile new file: contrib/man/md/README.md new file: contrib/man/md/docker-attach.md new file: contrib/man/md/docker-build.md new file: contrib/man/md/docker-commit.md new file: contrib/man/md/docker-cp.md new file: contrib/man/md/docker-diff.md new file: contrib/man/md/docker-events.md new file: contrib/man/md/docker-export.md new file: contrib/man/md/docker-history.md new file: contrib/man/md/docker-images.md new file: contrib/man/md/docker-import.md new file: contrib/man/md/docker-info.md new file: contrib/man/md/docker-inspect.md new file: contrib/man/md/docker-kill.md new file: contrib/man/md/docker-load.md new file: contrib/man/md/docker-login.md new file: contrib/man/md/docker-logs.md new file: contrib/man/md/docker-port.md new file: contrib/man/md/docker-ps.md new file: contrib/man/md/docker-pull.md new file: contrib/man/md/docker-push.md new file: contrib/man/md/docker-restart.md new file: contrib/man/md/docker-rm.md new file: contrib/man/md/docker-rmi.md new file: contrib/man/md/docker-run.md new file: contrib/man/md/docker-save.md new file: contrib/man/md/docker-search.md new file: contrib/man/md/docker-start.md new file: contrib/man/md/docker-stop.md new file: contrib/man/md/docker-tag.md new file: contrib/man/md/docker-top.md new file: contrib/man/md/docker-wait.md new file: contrib/man/md/docker.md new file: contrib/man/md/md2man-all.sh --- contrib/man/md/Dockerfile | 5 + contrib/man/md/README.md | 90 ++++++++ contrib/man/md/docker-attach.md | 56 +++++ contrib/man/md/docker-build.md | 72 +++++++ contrib/man/md/docker-commit.md | 34 ++++ contrib/man/md/docker-cp.md | 23 +++ contrib/man/md/docker-diff.md | 42 ++++ contrib/man/md/docker-events.md | 46 +++++ contrib/man/md/docker-export.md | 26 +++ contrib/man/md/docker-history.md | 32 +++ contrib/man/md/docker-images.md | 92 +++++++++ contrib/man/md/docker-import.md | 39 ++++ contrib/man/md/docker-info.md | 45 ++++ contrib/man/md/docker-inspect.md | 228 +++++++++++++++++++++ contrib/man/md/docker-kill.md | 21 ++ contrib/man/md/docker-load.md | 36 ++++ contrib/man/md/docker-login.md | 36 ++++ contrib/man/md/docker-logs.md | 26 +++ contrib/man/md/docker-port.md | 15 ++ contrib/man/md/docker-ps.md | 68 +++++++ contrib/man/md/docker-pull.md | 36 ++++ contrib/man/md/docker-push.md | 42 ++++ contrib/man/md/docker-restart.md | 20 ++ contrib/man/md/docker-rm.md | 56 +++++ contrib/man/md/docker-rmi.md | 35 ++++ contrib/man/md/docker-run.md | 339 +++++++++++++++++++++++++++++++ contrib/man/md/docker-save.md | 34 ++++ contrib/man/md/docker-search.md | 55 +++++ contrib/man/md/docker-start.md | 25 +++ contrib/man/md/docker-stop.md | 22 ++ contrib/man/md/docker-tag.md | 47 +++++ contrib/man/md/docker-top.md | 26 +++ contrib/man/md/docker-wait.md | 22 ++ contrib/man/md/docker.md | 184 +++++++++++++++++ contrib/man/md/md2man-all.sh | 9 + 35 files changed, 1984 insertions(+) create mode 100644 contrib/man/md/Dockerfile create mode 100644 contrib/man/md/README.md create mode 100644 contrib/man/md/docker-attach.md create mode 100644 contrib/man/md/docker-build.md create mode 100644 contrib/man/md/docker-commit.md create mode 100644 contrib/man/md/docker-cp.md create mode 100644 contrib/man/md/docker-diff.md create mode 100644 contrib/man/md/docker-events.md create mode 100644 contrib/man/md/docker-export.md create mode 100644 contrib/man/md/docker-history.md create mode 100644 contrib/man/md/docker-images.md create mode 100644 contrib/man/md/docker-import.md create mode 100644 contrib/man/md/docker-info.md create mode 100644 contrib/man/md/docker-inspect.md create mode 100644 contrib/man/md/docker-kill.md create mode 100644 contrib/man/md/docker-load.md create mode 100644 contrib/man/md/docker-login.md create mode 100644 contrib/man/md/docker-logs.md create mode 100644 contrib/man/md/docker-port.md create mode 100644 contrib/man/md/docker-ps.md create mode 100644 contrib/man/md/docker-pull.md create mode 100644 contrib/man/md/docker-push.md create mode 100644 contrib/man/md/docker-restart.md create mode 100644 contrib/man/md/docker-rm.md create mode 100644 contrib/man/md/docker-rmi.md create mode 100644 contrib/man/md/docker-run.md create mode 100644 contrib/man/md/docker-save.md create mode 100644 contrib/man/md/docker-search.md create mode 100644 contrib/man/md/docker-start.md create mode 100644 contrib/man/md/docker-stop.md create mode 100644 contrib/man/md/docker-tag.md create mode 100644 contrib/man/md/docker-top.md create mode 100644 contrib/man/md/docker-wait.md create mode 100644 contrib/man/md/docker.md create mode 100755 contrib/man/md/md2man-all.sh diff --git a/contrib/man/md/Dockerfile b/contrib/man/md/Dockerfile new file mode 100644 index 0000000000..fa148fcdaf --- /dev/null +++ b/contrib/man/md/Dockerfile @@ -0,0 +1,5 @@ +FROM fedora +MAINTAINER ipbabble +# Update and install pandoc +RUN yum -y update; yum clean all; +RUN yum -y install pandoc; diff --git a/contrib/man/md/README.md b/contrib/man/md/README.md new file mode 100644 index 0000000000..601b30e033 --- /dev/null +++ b/contrib/man/md/README.md @@ -0,0 +1,90 @@ +Docker Documentation +==================== + +This directory contains the docker user manual in Markdown format. +DO NOT edit the man pages in the man1 directory. Instead make changes here. + +# File List + + docker.md + docker-attach.md + docker-build.md + docker-commit.md + docker-cp.md + docker-diff.md + docker-events.md + docker-export.md + docker-history.md + docker-images.md + docker-import.md + docker-info.md + docker-inspect.md + docker-kill.md + docker-load.md + docker-login.md + docker-logs.md + docker-port.md + docker-ps.md + docker-pull.md + docker-push.md + docker-restart.md + docker-rmi.md + docker-rm.md + docker-run.md + docker-save.md + docker-search.md + docker-start.md + docker-stop.md + docker-tag.md + docker-top.md + docker-wait.md + Dockerfile + md2man-all.sh + +# Generating man pages from the Markdown + +There are three ways to generate the man pages: +* Manually Individually +* Using the Script +* Using a the Pandoc Container (**Recommended**) + +The first and second approach require you to install pandoc packages + on your host using the host operating systems package installer. Check +to see if pandoc is available if you choose that method. + +The Pandoc container approach is recommneded because the conversion process +is isolated inside a fedora container and thereofre does not require you +find and install pandoc on your host. + +## Manually Individually + +You can generate the manpage by: + + pandoc -s -t man docker-.md ../man1/docker-.1 + +The resulting man pages are stored in ../man1 + +## Manually All + +Or regenerate all the manpages from this source using: + + for FILE in *.md + do + pandoc -s -t man $FILE -o ../man1/"${FILE%.*}".1 + done + +## Using the pandoc Container + +There is a Dockerfile provided in the `docker/contrib/man/md` directory. + +Use this Dockerfile to create a `fedora/pandoc` container: + + # docker build -t fedora/pandoc . + +After the container is created run the following command from your +`docker/contrib/man/md` directory: + + # docker run -v //docker/contrib/man:/pandoc:rw \ + -w /pandoc -i fedora/pandoc /pandoc/md/md2man-all.sh + +This will generate all man files into `docker/contrib/man/man1`. diff --git a/contrib/man/md/docker-attach.md b/contrib/man/md/docker-attach.md new file mode 100644 index 0000000000..0365fbdeba --- /dev/null +++ b/contrib/man/md/docker-attach.md @@ -0,0 +1,56 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-attach - Attach to a running container + +# SYNOPSIS +**docker attach** **--no-stdin**[=*false*] **--sig-proxy**[=*true*] CONTAINER + +# DESCRIPTION +If you **docker run** a container in detached mode (**-d**), you can reattach to + the detached container with **docker attach** using the container's ID or name. + +You can detach from the container again (and leave it running) with `CTRL-c` (for + a quiet exit) or `CTRL-\` to get a stacktrace of the Docker client when it quits +. When you detach from a container the exit code will be returned to +the client. + +# OPTIONS +**--no-stdin**=*true*|*false* +When set to true, do not attach to stdin. The default is *false*. + +**--sig-proxy**=*true*|*false*: +When set to true, proxify all received signal to the process (even in non-tty +mode). The default is *true*. + +# EXAMPLES + +##Attaching to a container + +In this example the top command is run inside a container, from an image called +fedora, in detached mode. The ID from the container is passed into the **docker +attach** command: + + # ID=$(sudo docker run -d fedora /usr/bin/top -b) + # sudo docker attach $ID + top - 02:05:52 up 3:05, 0 users, load average: 0.01, 0.02, 0.05 + Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie + Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st + Mem: 373572k total, 355560k used, 18012k free, 27872k buffers + Swap: 786428k total, 0k used, 786428k free, 221740k cached + + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND + 1 root 20 0 17200 1116 912 R 0 0.3 0:00.03 top + + top - 02:05:55 up 3:05, 0 users, load average: 0.01, 0.02, 0.05 + Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie + Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st + Mem: 373572k total, 355244k used, 18328k free, 27872k buffers + Swap: 786428k total, 0k used, 786428k free, 221776k cached + + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND + 1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-build.md b/contrib/man/md/docker-build.md new file mode 100644 index 0000000000..c9455f0e42 --- /dev/null +++ b/contrib/man/md/docker-build.md @@ -0,0 +1,72 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-build - Build a container image from a Dockerfile source at PATH + +# SYNOPSIS +**docker build** [**--no-cache**[=*false*] [**-q**|**--quiet**[=*false*] + [**-rm**] [**-t**|**--tag**=*tag*] PATH | URL | - + +# DESCRIPTION +This will read the Dockerfile from the directory specified in **PATH**. It also + sends any other files and directories found in the current directory to the +Docker daemon. The contents of this directory would be used by **ADD** commands +found within the Dockerfile. Warning, this will send a lot of data to the Docker +daemon if the current directory contains a lot of data. + +If the absolute path is provided instead of ‘.’, only the files and directories +required by the **ADD** command from the Dockerfile will be added to the context + and transferred to the Docker daemon. + +When a single Dockerfile is given as URL, then no context is set. When a Git +repository is set as **URL**, the repository is used as context. + +# OPTIONS + +**-q**, **--quiet**=*true*|*false* +: When set to true, suppress verbose build output. Default is *false*. + +**--rm**=*true*|*false* +: When true, remove intermediate containers that are created during the build process. The default is true. + +**-t**, **--tag**=*tag* +: Tag to be applied to the resulting image on successful completion of the build. + +**--no-cache**=*true*|*false* +: When set to true, do not use a cache when building the image. The default is *false*. + +# EXAMPLES + +## Building an image from current directory + +Using a Dockerfile, Docker images are built using the build command: + + docker build . + +If, for some reason, you do not what to remove the intermediate containers created during the build you must set --rm=false: + + docker build --rm=false . + +A good practice is to make a sub-directory with a related name and create the +Dockerfile in that directory. E.g. a directory called mongo may contain a +Dockerfile for a MongoDB image, or a directory called httpd may contain a +Dockerfile for an Apache web server. + +It is also good practice to add the files required for the image to the +sub-directory. These files will be then specified with the `ADD` instruction in +the Dockerfile. Note: if you include a tar file, which is good practice, then +Docker will automatically extract the contents of the tar file specified in the +`ADD` instruction into the specified target. + +## Building an image using a URL + +This will clone the Github repository and use it as context. The Dockerfile at the root of the repository is used as Dockerfile. This only works if the Github repository is a dedicated repository. + + docker build github.com/scollier/Fedora-Dockerfiles/tree/master/apache + +Note that you can specify an arbitrary Git repository by using the `git://` +schema. + +# HISTORY +March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-commit.md b/contrib/man/md/docker-commit.md new file mode 100644 index 0000000000..c1a70d3f59 --- /dev/null +++ b/contrib/man/md/docker-commit.md @@ -0,0 +1,34 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-commit - Create a new image from the changes to an existing + container + +# SYNOPSIS +**docker commit** **-a**|**--author**[=""] **-m**|**--message**[=""] CONTAINER + [REPOSITORY[:TAG]] + +# DESCRIPTION +Using an existing container's name or ID you can create a new image. + +# OPTIONS +**-a, --author**="" + Author name. (eg. "John Hannibal Smith " + +**-m, --message**="" + Commit message + +# EXAMPLES + +## Creating a new image from an existing container +And existing Fedora based container has had Apache installed while running +in interactive mode with the bash shell. Apache is also running. To + create a new image run docker ps to find the container's ID and then run: + + # docker commit -me= "Added Apache to Fedora base image" \ + --a="A D Ministrator" 98bd7fc99854 fedora/fedora_httpd:20 + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and in \ No newline at end of file diff --git a/contrib/man/md/docker-cp.md b/contrib/man/md/docker-cp.md new file mode 100644 index 0000000000..9043b776b4 --- /dev/null +++ b/contrib/man/md/docker-cp.md @@ -0,0 +1,23 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-cp - Copy files/folders from the PATH to the HOSTPATH + +# SYNOPSIS +**docker cp** CONTAINER:PATH HOSTPATH + +# DESCRIPTION +Copy files/folders from the containers filesystem to the host +path. Paths are relative to the root of the filesystem. Files + can be copied from a running or stopped containers + +# EXAMPLE +An important shell script file, created in a bash shell, is copied from +the exited container to the current dir on the host: + + # docker cp c071f3c3ee81:setup.sh . + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-diff.md b/contrib/man/md/docker-diff.md new file mode 100644 index 0000000000..9b0c76c9d5 --- /dev/null +++ b/contrib/man/md/docker-diff.md @@ -0,0 +1,42 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-diff - Inspect changes on a container's filesystem + +# SYNOPSIS +**docker diff** CONTAINER + +# DESCRIPTION +Inspect changes on a container's filesystem. You can use the full or +shortened container ID or the container name set using +**docker run --name** option. + +# EXAMPLE +Inspect the changes to on a nginx container: + + # docker diff 1fdfd1f54c1b + C /dev + C /dev/console + C /dev/core + C /dev/stdout + C /dev/fd + C /dev/ptmx + C /dev/stderr + C /dev/stdin + C /run + A /run/nginx.pid + C /var/lib/nginx/tmp + A /var/lib/nginx/tmp/client_body + A /var/lib/nginx/tmp/fastcgi + A /var/lib/nginx/tmp/proxy + A /var/lib/nginx/tmp/scgi + A /var/lib/nginx/tmp/uwsgi + C /var/log/nginx + A /var/log/nginx/access.log + A /var/log/nginx/error.log + + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-events.md b/contrib/man/md/docker-events.md new file mode 100644 index 0000000000..61e0e5c0ad --- /dev/null +++ b/contrib/man/md/docker-events.md @@ -0,0 +1,46 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-events - Get real time events from the server + +**docker events** **--since**=""|*epoch-time* + +# DESCRIPTION +Get event information from the Docker daemon. Information can include historical +information and real-time information. + +# OPTIONS +**--since**="" +Show previously created events and then stream. This can be in either +seconds since epoch, or date string. + +# EXAMPLES + +## Listening for Docker events + +After running docker events a container 786d698004576 is started and stopped: +(The container name has been shortened in the ouput below) + + # docker events + [2014-04-12 18:23:04 -0400 EDT] 786d69800457: (from whenry/testimage:latest) start + [2014-04-12 18:23:13 -0400 EDT] 786d69800457: (from whenry/testimage:latest) die + [2014-04-12 18:23:13 -0400 EDT] 786d69800457: (from whenry/testimage:latest) stop + +## Listening for events since a given date +Again the output container IDs have been shortened for the purposes of this document: + + # docker events --since '2014-04-12' + [2014-04-12 18:11:28 -0400 EDT] c655dbf640dc: (from whenry/testimage:latest) create + [2014-04-12 18:11:28 -0400 EDT] c655dbf640dc: (from whenry/testimage:latest) start + [2014-04-12 18:14:13 -0400 EDT] 786d69800457: (from whenry/testimage:latest) create + [2014-04-12 18:14:13 -0400 EDT] 786d69800457: (from whenry/testimage:latest) start + [2014-04-12 18:22:44 -0400 EDT] 786d69800457: (from whenry/testimage:latest) die + [2014-04-12 18:22:44 -0400 EDT] 786d69800457: (from whenry/testimage:latest) stop + [2014-04-12 18:23:04 -0400 EDT] 786d69800457: (from whenry/testimage:latest) start + [2014-04-12 18:23:13 -0400 EDT] 786d69800457: (from whenry/testimage:latest) die + [2014-04-12 18:23:13 -0400 EDT] 786d69800457: (from whenry/testimage:latest) stop + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. \ No newline at end of file diff --git a/contrib/man/md/docker-export.md b/contrib/man/md/docker-export.md new file mode 100644 index 0000000000..ab11aa1266 --- /dev/null +++ b/contrib/man/md/docker-export.md @@ -0,0 +1,26 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-export - Export the contents of a filesystem as a tar archive to +STDOUT. + +# SYNOPSIS +**docker export** CONTAINER + +# DESCRIPTION +Export the contents of a container's filesystem using the full or shortened +container ID or container name. The output is exported to STDOUT and can be +redirected to a tar file. + +# EXAMPLE +Export the contents of the container called angry_bell to a tar file +called test.tar: + + # docker export angry_bell > test.tar + # ls *.tar + test.tar + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-history.md b/contrib/man/md/docker-history.md new file mode 100644 index 0000000000..54b75ea22b --- /dev/null +++ b/contrib/man/md/docker-history.md @@ -0,0 +1,32 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-history - Show the history of an image + +# SYNOPSIS +**docker history** **--no-trunc**[=*false*] [**-q**|**--quiet**[=*false*]] + IMAGE + +# DESCRIPTION + +Show the history of when and how an image was created. + +# OPTIONS + +**--no-trunc**=*true*|*false* + When true don't truncate output. Default is false + +**-q**, **--quiet=*true*|*false* + When true only show numeric IDs. Default is false. + +# EXAMPLE + $ sudo docker history fedora + IMAGE CREATED CREATED BY SIZE + 105182bb5e8b 5 days ago /bin/sh -c #(nop) ADD file:71356d2ad59aa3119d 372.7 MB + 73bd853d2ea5 13 days ago /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar 0 B + 511136ea3c5a 10 months ago 0 B + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-images.md b/contrib/man/md/docker-images.md new file mode 100644 index 0000000000..7d2bf5c719 --- /dev/null +++ b/contrib/man/md/docker-images.md @@ -0,0 +1,92 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-images - List the images in the local repository + +# SYNOPSIS +**docker images** +[**-a**|**--all**=*false*] +[**--no-trunc**[=*false*] +[**-q**|**--quiet**[=*false*] +[**-t**|**--tree**=*false*] +[**-v**|**--viz**=*false*] +[NAME] + +# DESCRIPTION +This command lists the images stored in the local Docker repository. + +By default, intermediate images, used during builds, are not listed. Some of the +output, e.g. image ID, is truncated, for space reasons. However the truncated +image ID, and often the first few characters, are enough to be used in other +Docker commands that use the image ID. The output includes repository, tag, image + ID, date created and the virtual size. + +The title REPOSITORY for the first title may seem confusing. It is essentially +the image name. However, because you can tag a specific image, and multiple tags + (image instances) can be associated with a single name, the name is really a +repository for all tagged images of the same name. For example consider an image +called fedora. It may be tagged with 18, 19, or 20, etc. to manage different +versions. + +# OPTIONS + +**-a**, **--all**=*true*|*false* +: When set to true, also include all intermediate images in the list. The +default is false. + +**--no-trunc**=*true*|*false* +: When set to true, list the full image ID and not the truncated ID. The default is false. + +**-q**, **--quiet**=*true*|*false* +: When set to true, list the complete image ID as part of the output. The +default is false. + +**-t**, **--tree**=*true*|*false* +: When set to true, list the images in a tree dependency tree (hierarchy) format +. The default is false. + +**-v**, **--viz**=*true*|*false* +: When set to true, list the graph in graphviz format. The default is *false*. + +# EXAMPLES + +## Listing the images + +To list the images in a local repository (not the registry) run: + + docker images + +The list will contain the image repository name, a tag for the image, and an +image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG, +IMAGE ID, CREATED, and VIRTUAL SIZE. + +To get a verbose list of images which contains all the intermediate images used in builds use **-a**: + + docker images -a + +## List images dependency tree hierarchy + +To list the images in the local repository (not the registry) in a dependency +tree format, use the **-t** option. + + docker images -t + +This displays a staggered hierarchy tree where the less indented image is the oldest with dependent image layers branching inward (to the right) on subsequent lines. The newest or top level image layer is listed last in any tree branch. + +## List images in GraphViz format + +To display the list in a format consumable by a GraphViz tools run with **-v**. +For example to produce a .png graph file of the hierarchy use: + + docker images --viz | dot -Tpng -o docker.png + +## Listing only the shortened image IDs + +Listing just the shortened image IDs. This can be useful for some automated tools. + + docker images -q + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based + on docker.io source material and internal work. diff --git a/contrib/man/md/docker-import.md b/contrib/man/md/docker-import.md new file mode 100644 index 0000000000..145e6d3780 --- /dev/null +++ b/contrib/man/md/docker-import.md @@ -0,0 +1,39 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-import - Create an empty filesystem image and import the contents of + the tarball into it. + +# SYNOPSIS +**docker import** URL|- [REPOSITORY[:TAG]] + +# DESCRIPTION +Create a new filesystem image from the contents of a tarball (.tar, .tar.gz, + .tgz, .bzip, .tar.xz, .txz) into it, then optionally tag it. + +# EXAMPLES + +## Import from a remote location + + # docker import http://example.com/exampleimage.tgz example/imagerepo + +## Import from a local file + +Import to docker via pipe and stdin: + + # cat exampleimage.tgz | docker import - example/imagelocal + +## Import from a local file and tag + +Import to docker via pipe and stdin: + + # cat exampleimageV2.tgz | docker import - example/imagelocal:V-2.0 + +## Import from a local directory + + # tar -c . | docker import - exampleimagedir + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-info.md b/contrib/man/md/docker-info.md new file mode 100644 index 0000000000..55ab212bb8 --- /dev/null +++ b/contrib/man/md/docker-info.md @@ -0,0 +1,45 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-info - Display system wide information + +# SYNOPSIS +**docker info** + +# DESCRIPTION +This command displays system wide information regarding the Docker installation. +Information displayed includes the number of containers and images, pool name, +data file, metadata file, data space used, total data space, metadata space used, + total metadata space, execution driver, and the kernel version. + +The data file is where the images are stored and the metadata file is where the +meta data regarding those images are stored. When run for the first time Docker +allocates a certain amount of data space and meta data space from the space +available on the volume where `/var/lib/docker` is mounted. + +# OPTIONS +There are no available options. + +# EXAMPLES + +## Display Docker system information + +Here is a sample output: + + # docker info + Containers: 18 + Images: 95 + Storage Driver: devicemapper + Pool Name: docker-8:1-170408448-pool + Data file: /var/lib/docker/devicemapper/devicemapper/data + Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata + Data Space Used: 9946.3 Mb + Data Space Total: 102400.0 Mb + Metadata Space Used: 9.9 Mb + Metadata Space Total: 2048.0 Mb + Execution Driver: native-0.1 + Kernel Version: 3.10.0-116.el7.x86_64 + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-inspect.md b/contrib/man/md/docker-inspect.md new file mode 100644 index 0000000000..86dcd17fd3 --- /dev/null +++ b/contrib/man/md/docker-inspect.md @@ -0,0 +1,228 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-inspect - Return low-level information on a container/image + +# SYNOPSIS +**docker inspect** [**-f**|**--format**="" CONTAINER|IMAGE +[CONTAINER|IMAGE...] + +# DESCRIPTION + +This displays all the information available in Docker for a given +container or image. By default, this will render all results in a JSON +array. If a format is specified, the given template will be executed for +each result. + +# OPTIONS +**-f**, **--format**="" +: The text/template package of Go describes all the details of the +format. See examples section + +# EXAMPLES + +## Getting information on a container + +To get information on a container use it's ID or instance name: + + #docker inspect 1eb5fabf5a03 + [{ + "ID": "1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b", + "Created": "2014-04-04T21:33:52.02361335Z", + "Path": "/usr/sbin/nginx", + "Args": [], + "Config": { + "Hostname": "1eb5fabf5a03", + "Domainname": "", + "User": "", + "Memory": 0, + "MemorySwap": 0, + "CpuShares": 0, + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "PortSpecs": null, + "ExposedPorts": { + "80/tcp": {} + }, + "Tty": true, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": [ + "/usr/sbin/nginx" + ], + "Dns": null, + "DnsSearch": null, + "Image": "summit/nginx", + "Volumes": null, + "VolumesFrom": "", + "WorkingDir": "", + "Entrypoint": null, + "NetworkDisabled": false, + "OnBuild": null, + "Context": { + "mount_label": "system_u:object_r:svirt_sandbox_file_t:s0:c0,c650", + "process_label": "system_u:system_r:svirt_lxc_net_t:s0:c0,c650" + } + }, + "State": { + "Running": true, + "Pid": 858, + "ExitCode": 0, + "StartedAt": "2014-04-04T21:33:54.16259207Z", + "FinishedAt": "0001-01-01T00:00:00Z", + "Ghost": false + }, + "Image": "df53773a4390e25936f9fd3739e0c0e60a62d024ea7b669282b27e65ae8458e6", + "NetworkSettings": { + "IPAddress": "172.17.0.2", + "IPPrefixLen": 16, + "Gateway": "172.17.42.1", + "Bridge": "docker0", + "PortMapping": null, + "Ports": { + "80/tcp": [ + { + "HostIp": "0.0.0.0", + "HostPort": "80" + } + ] + } + }, + "ResolvConfPath": "/etc/resolv.conf", + "HostnamePath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/hostname", + "HostsPath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/hosts", + "Name": "/ecstatic_ptolemy", + "Driver": "devicemapper", + "ExecDriver": "native-0.1", + "Volumes": {}, + "VolumesRW": {}, + "HostConfig": { + "Binds": null, + "ContainerIDFile": "", + "LxcConf": [], + "Privileged": false, + "PortBindings": { + "80/tcp": [ + { + "HostIp": "0.0.0.0", + "HostPort": "80" + } + ] + }, + "Links": null, + "PublishAllPorts": false, + "DriverOptions": { + "lxc": null + }, + "CliAddress": "" + } + +## Getting the IP address of a container instance + +To get the IP address of a container use: + + # docker inspect --format='{{.NetworkSettings.IPAddress}}' 1eb5fabf5a03 + 172.17.0.2 + +## Listing all port bindings + +One can loop over arrays and maps in the results to produce simple text +output: + + # docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' 1eb5fabf5a03 + + 80/tcp -> 80 + +## Getting information on an image + +Use an image's ID or name (e.g. repository/name[:tag]) to get information + on it. + + # docker inspect 58394af37342 + [{ + "id": "58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9", + "parent": "8abc22bad04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", + "created": "2014-02-03T16:10:40.500814677Z", + "container": "f718f19a28a5147da49313c54620306243734bafa63c76942ef6f8c4b4113bc5", + "container_config": { + "Hostname": "88807319f25e", + "Domainname": "", + "User": "", + "Memory": 0, + "MemorySwap": 0, + "CpuShares": 0, + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "PortSpecs": null, + "ExposedPorts": null, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": [ + "/bin/sh", + "-c", + "#(nop) ADD fedora-20-dummy.tar.xz in /" + ], + "Dns": null, + "DnsSearch": null, + "Image": "8abc22bad04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", + "Volumes": null, + "VolumesFrom": "", + "WorkingDir": "", + "Entrypoint": null, + "NetworkDisabled": false, + "OnBuild": null, + "Context": null + }, + "docker_version": "0.6.3", + "author": "I P Babble \u003clsm5@ipbabble.com\u003e - ./buildcontainers.sh", + "config": { + "Hostname": "88807319f25e", + "Domainname": "", + "User": "", + "Memory": 0, + "MemorySwap": 0, + "CpuShares": 0, + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "PortSpecs": null, + "ExposedPorts": null, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": null, + "Dns": null, + "DnsSearch": null, + "Image": "8abc22bad04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", + "Volumes": null, + "VolumesFrom": "", + "WorkingDir": "", + "Entrypoint": null, + "NetworkDisabled": false, + "OnBuild": null, + "Context": null + }, + "architecture": "x86_64", + "Size": 385520098 + }] + +# HISTORY + +April 2014, Originally compiled by William Henry (whenry at redhat dot +com) based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-kill.md b/contrib/man/md/docker-kill.md new file mode 100644 index 0000000000..8175002d33 --- /dev/null +++ b/contrib/man/md/docker-kill.md @@ -0,0 +1,21 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-kill - Kill a running container (send SIGKILL, or specified signal) + +# SYNOPSIS +**docker kill** **--signal**[=*"KILL"*] CONTAINER [CONTAINER...] + +# DESCRIPTION + +The main process inside each container specified will be sent SIGKILL, + or any signal specified with option --signal. + +# OPTIONS +**-s**, **--signal**=*"KILL"* + Signal to send to the container + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-load.md b/contrib/man/md/docker-load.md new file mode 100644 index 0000000000..4438858070 --- /dev/null +++ b/contrib/man/md/docker-load.md @@ -0,0 +1,36 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-load - Load an image from a tar archive on STDIN + +# SYNOPSIS +**docker load** **--input**="" + +# DESCRIPTION + +Loads a tarred repository from a file or the standard input stream. + Restores both images and tags. + +# OPTIONS + +**-i**, **--input**="" + Read from a tar archive file, instead of STDIN + +# EXAMPLE + + $ sudo docker images + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + busybox latest 769b9341d937 7 weeks ago 2.489 MB + $ sudo docker load --input fedora.tar + $ sudo docker images + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + busybox latest 769b9341d937 7 weeks ago 2.489 MB + fedora rawhide 0d20aec6529d 7 weeks ago 387 MB + fedora 20 58394af37342 7 weeks ago 385.5 MB + fedora heisenbug 58394af37342 7 weeks ago 385.5 MB + fedora latest 58394af37342 7 weeks ago 385.5 MB + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-login.md b/contrib/man/md/docker-login.md new file mode 100644 index 0000000000..635d1bd996 --- /dev/null +++ b/contrib/man/md/docker-login.md @@ -0,0 +1,36 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-login - Register or Login to a docker registry server. + +# SYNOPSIS +**docker login** [**-e**|**-email**=""] [**-p**|**--password**=""] + [**-u**|**--username**=""] [SERVER] + +# DESCRIPTION +Register or Login to a docker registry server, if no server is + specified "https://index.docker.io/v1/" is the default. If you want to + login to a private registry you can specify this by adding the server + name. + +# OPTIONS +**-e**, **--email**="" + Email address + +**-p**, **--password**="" + Password + +**-u**, **--username**="" + Username + +# EXAMPLE + +## Login to a local registry + + # docker login localhost:8080 + + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-logs.md b/contrib/man/md/docker-logs.md new file mode 100644 index 0000000000..ad9b13540c --- /dev/null +++ b/contrib/man/md/docker-logs.md @@ -0,0 +1,26 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-logs - Fetch the logs of a container + +# SYNOPSIS +**docker logs** **--follow**[=*false*] CONTAINER + +# DESCRIPTION +The **docker logs** command batch-retrieves whatever logs are present for + a container at the time of execution. This does not guarantee execution +order when combined with a docker run (i.e. your run may not have generated + any logs at the time you execute docker logs). + +The **docker logs --follow** command combines commands **docker logs** and + **docker attach**. It will first return all logs from the beginning and +then continue streaming new output from the container’s stdout and stderr. + +# OPTIONS +**-f, --follow**=*true*|*false* + When *true*, follow log output. The default is false. + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-port.md b/contrib/man/md/docker-port.md new file mode 100644 index 0000000000..8b604c0912 --- /dev/null +++ b/contrib/man/md/docker-port.md @@ -0,0 +1,15 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-port - Lookup the public-facing port which is NAT-ed to PRIVATE_PORT + +# SYNOPSIS +**docker port** CONTAINER PRIVATE_PORT + +# DESCRIPTION +Lookup the public-facing port which is NAT-ed to PRIVATE_PORT + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-ps.md b/contrib/man/md/docker-ps.md new file mode 100644 index 0000000000..2662a02139 --- /dev/null +++ b/contrib/man/md/docker-ps.md @@ -0,0 +1,68 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-ps - List containers + +# SYNOPSIS +**docker ps** [**-a**|**--all**=*false*] [**--before**=""] +[**-l**|**--latest**=*false*] [**-n**=*-1*] [**--no-trunc**=*false*] +[**-q**|**--quiet**=*false*] [**-s**|**--size**=*false*] +[**--since**=""] + +# DESCRIPTION + +List the containers in the local repository. By default this show only +the running containers. + +# OPTIONS + +**-a**, **--all**=*true*|*false* + When true show all containers. Only running containers are shown by + default. Default is false. + +**--before**="" + Show only container created before Id or Name, include non-running + ones. + +**-l**, **--latest**=*true*|*false* + When true show only the latest created container, include non-running + ones. The default is false. + +**-n**=NUM + Show NUM (integer) last created containers, include non-running ones. + The default is -1 (none) + +**--no-trunc**=*true*|*false* + When true truncate output. Default is false. + +**-q**, **--quiet**=*true*|*false* + When false only display numeric IDs. Default is false. + +**-s**, **--size**=*true*|*false* + When true display container sizes. Default is false. + +**--since**="" + Show only containers created since Id or Name, include non-running ones. + +# EXAMPLE +# Display all containers, including non-running + + # docker ps -a + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + a87ecb4f327c fedora:20 /bin/sh -c #(nop) MA 20 minutes ago Exit 0 desperate_brattain + 01946d9d34d8 vpavlin/rhel7:latest /bin/sh -c #(nop) MA 33 minutes ago Exit 0 thirsty_bell + c1d3b0166030 acffc0358b9e /bin/sh -c yum -y up 2 weeks ago Exit 1 determined_torvalds + 41d50ecd2f57 fedora:20 /bin/sh -c #(nop) MA 2 weeks ago Exit 0 drunk_pike + +# Display only IDs of all containers, including non-running + + # docker ps -a -q + a87ecb4f327c + 01946d9d34d8 + c1d3b0166030 + 41d50ecd2f57 + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-pull.md b/contrib/man/md/docker-pull.md new file mode 100644 index 0000000000..8d9ad0e3ab --- /dev/null +++ b/contrib/man/md/docker-pull.md @@ -0,0 +1,36 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-pull - Pull an image or a repository from the registry + +# SYNOPSIS +**docker pull** NAME[:TAG] + +# DESCRIPTION + +This command pulls down an image or a repository from the registry. If +there is more than one image for a repository (e.g. fedora) then all +images for that repository name are pulled down including any tags. + +# EXAMPLE + +# Pull a reposiotry with multiple images + + $ sudo docker pull fedora + Pulling repository fedora + ad57ef8d78d7: Download complete + 105182bb5e8b: Download complete + 511136ea3c5a: Download complete + 73bd853d2ea5: Download complete + + $ sudo docker images + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + fedora rawhide ad57ef8d78d7 5 days ago 359.3 MB + fedora 20 105182bb5e8b 5 days ago 372.7 MB + fedora heisenbug 105182bb5e8b 5 days ago 372.7 MB + fedora latest 105182bb5e8b 5 days ago 372.7 MB + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-push.md b/contrib/man/md/docker-push.md new file mode 100644 index 0000000000..4c887d399e --- /dev/null +++ b/contrib/man/md/docker-push.md @@ -0,0 +1,42 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-push - Push an image or a repository to the registry + +# SYNOPSIS +**docker push** NAME[:TAG] + +# DESCRIPTION +Push and image or repository to a registry. The registry may the default + [index.docker.io](https://index.docker.io/v1/) or a another registry + +# EXAMPLE + +# Pushing a new image to a registry + +First save the new image by finding the container ID (using **docker ps**) +and then committing it to a new image name: + + # docker commit c16378f943fe rhel-httpd + +Now push the image to the registry using the image ID. In this example +the registry is on host named registry-host and listening on port 5000. + Default Docker commands will push to the default `index.docker.io` + registry. Instead, push to the local registry, which is on a host called + registry-host*. To do this, tag the image with the host name or IP +address, and the port of the registry: + + # docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd + # docker push registry-host:5000/myadmin/rhel-httpd + +Check that this worked by running: + + # docker images + +You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd` + listed. + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-restart.md b/contrib/man/md/docker-restart.md new file mode 100644 index 0000000000..d60988c761 --- /dev/null +++ b/contrib/man/md/docker-restart.md @@ -0,0 +1,20 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-restart - Restart a running container + +# SYNOPSIS +**docker restart** [**-t**|**--time**[=*10*]] CONTAINER [CONTAINER...] + +# DESCRIPTION +Restart each container listed. + +# OPTIONS +**-t**, **--time**=NUM + Number of seconds to try to stop for before killing the container. Once + killed it will then be restarted. Default=10 + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-rm.md b/contrib/man/md/docker-rm.md new file mode 100644 index 0000000000..f569ed8bfa --- /dev/null +++ b/contrib/man/md/docker-rm.md @@ -0,0 +1,56 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 + +# NAME + +docker-rm - Remove one or more containers. + +# SYNOPSIS + +**docker rm** [**-f**|**--force**[=*false*] [**-l**|**--link**[=*false*] [**-v**| +**--volumes**[=*false*] +CONTAINER [CONTAINER...] + +# DESCRIPTION + +**docker rm** will remove one or more containers from the host node. The +container name or ID can be used. This does not remove images. You cannot +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. + +# OPTIONS + +**-f**, **--force**=*true*|*false* +: When set to true, force the removal of the container. The default is +*false*. + +**-l**, **--link**=*true*|*false* +: When set to true, remove the specified link and not the underlying +container. The default is *false*. + +**-v**, **--volumes**=*true*|*false* +: When set to true, remove the volumes associated to the container. The +default is *false*. + +# EXAMPLES + +##Removing a container using its ID## + +To remove a container using its ID, find either from a **docker ps -a** +command, or use the ID returned from the **docker run** command, or retrieve + it from a file used to store it using the **docker run --cidfile**: + + docker rm abebf7571666 + +##Removing a container using the container name## + +The name of the container can be found using the **docker ps -a** +command. The use that name as follows: + + docker rm hopeful_morse + +# HISTORY + +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based + on docker.io source material and internal work. diff --git a/contrib/man/md/docker-rmi.md b/contrib/man/md/docker-rmi.md new file mode 100644 index 0000000000..ef5ede6f87 --- /dev/null +++ b/contrib/man/md/docker-rmi.md @@ -0,0 +1,35 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-rmi \- Remove one or more images. + +# SYNOPSIS + +**docker rmi** [**-f**|**--force**[=*false*] IMAGE [IMAGE...] + +# DESCRIPTION + +This will remove one or more images from the host node. This does not +remove images from a registry. You cannot remove an image of a running +container unless you use the **-f** option. To see all images on a host + use the **docker images** command. + +# OPTIONS + +**-f**, **--force**=*true*|*false* +: When set to true, force the removal of the image. The default is +*false*. + +# EXAMPLES + +## Removing an image + +Here is an example of removing and image: + + docker rmi fedora/httpd + +# HISTORY + +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based + on docker.io source material and internal work. diff --git a/contrib/man/md/docker-run.md b/contrib/man/md/docker-run.md new file mode 100644 index 0000000000..a79706c430 --- /dev/null +++ b/contrib/man/md/docker-run.md @@ -0,0 +1,339 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-run - Run a process in an isolated container + +# SYNOPSIS +**docker run** +[**-a**|**--attach**[=]] [**-c**|**--cpu-shares**[=0] +[**-m**|**--memory**=*memory-limit*] +[**--cidfile**=*file*] [**-d**|**--detach**[=*false*]] [**--dns**=*IP-address*] +[**--name**=*name*] [**-u**|**--user**=*username*|*uid*] +[**--link**=*name*:*alias*] +[**-e**|**--env**=*environment*] [**--entrypoint**=*command*] +[**--expose**=*port*] [**-P**|**--publish-all**[=*false*]] +[**-p**|**--publish**=*port-mappping*] [**-h**|**--hostname**=*hostname*] +[**--rm**[=*false*]] [**--priviledged**[=*false*] +[**-i**|**--interactive**[=*false*] +[**-t**|**--tty**[=*false*]] [**--lxc-conf**=*options*] +[**-n**|**--networking**[=*true*]] +[**-v**|**--volume**=*volume*] [**--volumes-from**=*container-id*] +[**-w**|**--workdir**=*directory*] [**--sig-proxy**[=*true*]] +IMAGE [COMMAND] [ARG...] + +# DESCRIPTION + +Run a process in a new container. **docker run** starts a process with its own +file system, its own networking, and its own isolated process tree. The IMAGE +which starts the process may define defaults related to the process that will be +run in the container, the networking to expose, and more, but **docker run** +gives final control to the operator or administrator who starts the container +from the image. For that reason **docker run** has more options than any other +Docker command. + +If the IMAGE is not already loaded then **docker run** will pull the IMAGE, and +all image dependencies, from the repository in the same way running **docker +pull** IMAGE, before it starts the container from that image. + +# OPTIONS + +**-a**, **--attach**=*stdin*|*stdout*|*stderr*: +Attach to stdin, stdout or stderr. In foreground mode (the default when **-d** is + not specified), **docker run** can start the process in the container and attach + the console to the process’s standard input, output, and standard error. It can +even pretend to be a TTY (this is what most commandline executables expect) and +pass along signals. The **-a** option can be set for each of stdin, stdout, and +stderr. + +**-c**, **--cpu-shares**=0: +CPU shares in relative weight. You can increase the priority of a container with +the -c option. By default, all containers run at the same priority and get 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 run**. + +**--cidfile**=*file*: +Write the container ID to the file specified. + + +**-d**, **-detach**=*true*|*false*: +Detached mode. This runs the container in the background. It outputs the new +container's ID and any error messages. At any time you can run **docker ps** in +the other shell to view a list of the running containers. You can reattach to a +detached container with **docker attach**. If you choose to run a container in +the detached mode, then you cannot use the **-rm** option. + + +**--dns**=*IP-address*: +Set custom DNS servers. This option can be used to override the DNS configuration + passed to the container. Typically this is necessary when the host DNS +configuration is invalid for the container (eg. 127.0.0.1). When this is the case + the **-dns** flags is necessary for every run. + + +**-e**, **-env**=*environment*: +Set environment variables. This option allows you to specify arbitrary +environment variables that are available for the process that will be launched +inside of the container. + + +**--entrypoint**=*command*: +This option allows you to overwrite the default entrypoint of the image that is +set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND because + it specifies what executable to run when the container starts, but it is +(purposely) more difficult to override. The ENTRYPOINT gives a container its +default nature or behavior, so that when you set an ENTRYPOINT you can run the +container as if it were that binary, complete with default options, and you can +pass in more options via the COMMAND. But, sometimes an operator may want to run +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 ENTRYPOINT +. + +**--expose**=*port*: +Expose a port from the container without publishing it to your host. A containers + port can be exposed to other containers in three ways: 1) The developer can +expose the port using the EXPOSE parameter of the Dockerfile, 2) the operator can + use the **--expose** option with **docker run**, or 3) the container can be +started with the **--link**. + +**-m**, **-memory**=*memory-limit*: +Allows you to constrain the memory available to a container. If the host supports + swap memory, then the -m memory setting can be larger than physical RAM. The +memory limit format: , where unit = b, k, m or g. + +**-P**, **-publish-all**=*true*|*false*: +When set to true publish all exposed ports to the host interfaces. The default is + false. If the operator uses -P (or -p) then Docker will make the exposed port +accessible on the host and the ports will be available to any client that can +reach the host. To find the map between the host ports and the exposed ports, use + **docker port**. + + +**-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) + + +**-h**, **-hostname**=*hostname*: +Sets the container host name that is available inside the container. + + +**-i**, **-interactive**=*true*|*false*: +When set to true, keep stdin open even if not attached. The default is false. + + +**--link**=*name*:*alias*: +Add link to another container. The format is name:alias. If the operator uses +**--link** when starting the new client container, then the client container can +access the exposed port via a private networking interface. Docker will set some +environment variables in the client container to help indicate which interface +and port to use. + + +**-n**, **-networking**=*true*|*false*: +By default, all containers have networking enabled (true) and can make outgoing +connections. The operator can disable networking with **--networking** to false. + This disables all incoming and outgoing networking. In cases like this, I/O can +only be performed through files or by using STDIN/STDOUT. + +Also by default, the container will use the same DNS servers as the host. The +operator may override this with **-dns**. + + +**--name**=*name*: +Assign a name to the container. The operator can identify a container in three +ways: + + UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) + UUID short identifier (“f78375b1c487”) + Name (“jonah”) + +The UUID identifiers come from the Docker daemon, and if a name is not assigned +to the container with **--name** then the daemon will also generate a random +string name. The name is useful when defining links (see **--link**) (or any +other place you need to identify a container). This works for both background and + foreground Docker containers. + + +**--privileged**=*true*|*false*: +Give extended privileges to this container. By default, Docker containers are +“unprivileged” (=false) and cannot, for example, run a Docker daemon inside the +Docker container. This is because by default a container is not allowed to access + any devices. A “privileged” container is given access to all devices. + +When the operator executes **docker run -privileged**, Docker will enable access +to all devices on the host as well as set some configuration in AppArmor to allow + the container nearly all the same access to the host as processes running +outside of a container on the host. + + +**--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**. + + +**--sig-proxy**=*true*|*false*: +When set to true, proxify all received signals to the process (even in non-tty +mode). The default is true. + + +**-t**, **-tty**=*true*|*false*: +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 +interactive shell. The default is value is false. + + +**-u**, **-user**=*username*,*uid*: +Set a username or UID for the container. + + +**-v**, **-volume**=*volume*: +Bind mount a volume to the container. The **-v** option can be used one or more +times to add one or more mounts to a container. These mounts can then be used in +other containers using the **--volumes-from** option. See examples. + + +**--volumes-from**=*container-id*: +Will mount volumes from the specified container identified by container-id. Once +a volume is mounted in a one container it can be shared with other containers +using the **--volumes-from** option when running those other containers. The +volumes can be shared even if the original container with the mount is not +running. + + +**-w**, **-workdir**=*directory*: +Working directory inside the container. The default working directory for running + binaries within a container is the root directory (/). The developer can set a +different default with the Dockerfile WORKDIR instruction. The operator can +override the working directory by using the **-w** option. + + +**IMAGE**: +The image name or ID. + + +**COMMAND**: +The command or program to run inside the image. + + +**ARG**: +The arguments for the command to be run in the container. + +# EXAMPLES + +## Exposing log messages from the container to the host's log + +If you want messages that are logged in your container to show up in the host's +syslog/journal then you should bind mount the /var/log directory as follows. + + # docker run -v /dev/log:/dev/log -i -t fedora /bin/bash + +From inside the container you can test this by sending a message to the log. + + (bash)# logger "Hello from my container" + +Then exit and check the journal. + + # exit + + # journalctl -b | grep Hello + +This should list the message sent to logger. + +## Attaching to one or more from STDIN, STDOUT, STDERR + +If you do not specify -a then Docker will attach everything (stdin,stdout,stderr) +. You can specify to which of the three standard streams (stdin, stdout, stderr) +you’d like to connect instead, as in: + + # docker run -a stdin -a stdout -i -t fedora /bin/bash + +## Linking Containers + +The link feature allows multiple containers to communicate with each other. For +example, a container whose Dockerfile has exposed port 80 can be run and named as + follows: + + # docker run --name=link-test -d -i -t fedora/httpd + +A second container, in this case called linker, can communicate with the httpd container, named link-test, by running with the **--link=:** + + # docker run -t -i --link=link-test:lt --name=linker fedora /bin/bash + +Now the container linker is linked to container link-test with the alias lt. +Running the **env** command in the linker container shows environment variables + with the LT (alias) context (**LT_**) + + # env + HOSTNAME=668231cb0978 + TERM=xterm + LT_PORT_80_TCP=tcp://172.17.0.3:80 + LT_PORT_80_TCP_PORT=80 + LT_PORT_80_TCP_PROTO=tcp + LT_PORT=tcp://172.17.0.3:80 + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + PWD=/ + LT_NAME=/linker/lt + SHLVL=1 + HOME=/ + LT_PORT_80_TCP_ADDR=172.17.0.3 + _=/usr/bin/env + +When linking two containers Docker will use the exposed ports of the container to + create a secure tunnel for the parent to access. + + +## Mapping Ports for External Usage + +The exposed port of an application can be mapped to a host port using the **-p** + flag. For example a httpd port 80 can be mapped to the host port 8080 using the + following: + + # docker run -p 8080:80 -d -i -t fedora/httpd + +## Creating and Mounting a Data Volume Container + +Many applications require the sharing of persistent data across several +containers. Docker allows you to create a Data Volume Container that other +containers can mount from. For example, create a named container that contains +directories /var/volume1 and /tmp/volume2. The image will need to contain these +directories so a couple of RUN mkdir instructions might be required for you +fedora-data image: + + # docker run --name=data -v /var/volume1 -v /tmp/volume2 -i -t fedora-data true + # docker run --volumes-from=data --name=fedora-container1 -i -t fedora bash + +Multiple -volumes-from parameters will bring together multiple data volumes from +multiple containers. And it's possible to mount the volumes that came from the +DATA container in yet another container via the fedora-container1 intermidiery +container, allowing to abstract the actual data source from users of that data: + + # docker run --volumes-from=fedora-container1 --name=fedora-container2 -i -t fedora bash + +## Mounting External Volumes + +To mount a host directory as a container volume, specify the absolute path to the + directory and the absolute path for the container directory separated by a colon: + + # docker run -v /var/db:/data1 -i -t fedora bash + +When using SELinux, be aware that the host has no knowledge of container SELinux +policy. Therefore, in the above example, if SELinux policy is enforced, the +`/var/db` directory is not writable to the container. A "Permission Denied" +message will occur and an avc: message in the host's syslog. + + +To work around this, at time of writing this man page, the following command +needs to be run in order for the proper SELinux policy type label to be attached +to the host directory: + + # chcon -Rt svirt_sandbox_file_t /var/db + + +Now, writing to the /data1 volume in the container will be allowed and the +changes will also be reflected on the host in /var/db. + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based + on docker.io source material and internal work. diff --git a/contrib/man/md/docker-save.md b/contrib/man/md/docker-save.md new file mode 100644 index 0000000000..1bf60bcbac --- /dev/null +++ b/contrib/man/md/docker-save.md @@ -0,0 +1,34 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-save - Save an image to a tar archive (streamed to STDOUT by default) + +# SYNOPSIS +**docker save** [**-o**|**--output**=""] IMAGE + +# DESCRIPTION +Produces a tarred repository to the standard output stream. Contains all +parent layers, and all tags + versions, or specified repo:tag. + +Stream to a file instead of STDOUT by using **-o**. + +# OPTIONS +**-o**, **--output**="" + Write to an file, instead of STDOUT + +# EXAMPLE + +Save all fedora repository images to a fedora-all.tar and save the latest + fedora image to a fedora-latest.tar: + + $ sudo docker save fedora > fedora-all.tar + $ sudo docker save --output=fedora-latest.tar fedora:latest + $ ls -sh fedora-all.tar + 721M fedora-all.tar + $ ls -sh fedora-latest.tar + 367M fedora-latest.tar + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-search.md b/contrib/man/md/docker-search.md new file mode 100644 index 0000000000..875ceefd46 --- /dev/null +++ b/contrib/man/md/docker-search.md @@ -0,0 +1,55 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-search - Search the docker index for images + +# SYNOPSIS +**docker search** **--no-trunc**[=*false*] **-t**|**--trusted**[=*false*] + **-s**|**--stars**[=*0*] TERM + +# DESCRIPTION + +Search an index for an image with that matches the term TERM. The table +of images returned displays the name, description (truncated by default), + number of stars awarded, whether the image is official, and +whether it is trusted. + +# OPTIONS +**--no-trunc**=*true*|*false*: + When true display the complete description. The default is false. + +**-s**, **--stars**=NUM + Only displays with at least NUM (integer) stars. I.e. only those images +ranked >=NUM. + +**-t**, **--trusted**=*true*|*false*: + When true only show trusted builds. The default is false. + +# EXAMPLE + +## Search the registry for ranked images + +Search the registry for the term 'fedora' and only display those images +ranked 3 or higher: + + $ sudo docker search -s 3 fedora + NAME DESCRIPTION STARS OFFICIAL TRUSTED + mattdm/fedora A basic Fedora image corresponding roughly... 50 + fedora (Semi) Official Fedora base image. 38 + mattdm/fedora-small A small Fedora image on which to build. Co... 8 + goldmann/wildfly A WildFly application server running on a ... 3 [OK] + +## Search the registry for trusted images + +Search the registry for the term 'fedora' and only display trusted images +ranked 1 or higher: + + $ sudo docker search -s 1 -t fedora + NAME DESCRIPTION STARS OFFICIAL TRUSTED + goldmann/wildfly A WildFly application server running on a ... 3 [OK] + tutum/fedora-20 Fedora 20 image with SSH access. For the r... 1 [OK] + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-start.md b/contrib/man/md/docker-start.md new file mode 100644 index 0000000000..02b8a8a976 --- /dev/null +++ b/contrib/man/md/docker-start.md @@ -0,0 +1,25 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-start - Restart a stopped container + +# SYNOPSIS +**docker start** [**a**|**--attach**[=*false*]] [**-i**|**--interactive** +[=*true*] CONTAINER [CONTAINER...] + +# DESCRIPTION + +Start a stopped container. + +# OPTION +**-a**, **--attach**=*true*|*false* + When true attach to container's stdout/stderr and forward all signals to +the process + +**-i**, **--interactive**=*true*|*false* + When true attach to container's stdin + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-stop.md b/contrib/man/md/docker-stop.md new file mode 100644 index 0000000000..2a7403aed3 --- /dev/null +++ b/contrib/man/md/docker-stop.md @@ -0,0 +1,22 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-stop - Stop a running container + grace period) + +# SYNOPSIS +**docker stop** [**-t**|**--time**[=*10*]] CONTAINER [CONTAINER...] + +# DESCRIPTION +Stop a running container (Send SIGTERM, and then SIGKILL after + grace period) + +# OPTIONS +**-t**, **--time**=NUM + Wait NUM number of seconds for the container to stop before killing it. +The default is 10 seconds. + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-tag.md b/contrib/man/md/docker-tag.md new file mode 100644 index 0000000000..a3493051f9 --- /dev/null +++ b/contrib/man/md/docker-tag.md @@ -0,0 +1,47 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-tag - Tag an image in the repository + +# SYNOPSIS +**docker tag** [**-f**|**--force**[=*false*] +IMAGE [REGISTRYHOST/][USERNAME/]NAME[:TAG] + +# DESCRIPTION +This will tag an image in the repository. + +# "OPTIONS" +**-f**, **--force**=*true*|*false*: +When set to true, force the tag name. The default is *false*. + +**REGISTRYHOST** +: The hostname of the registry if required. This may also include the port +separated by a ':' + +**USERNAME** +: The username or other qualifying identifier for the image. + +**NAME** +: The image name. + +**TAG** +: The tag you are assigning to the image. +# EXAMPLES + +## Tagging an image + +Here is an example of tagging an image with the tag version1.0 : + + docker tag 0e5574283393 fedora/httpd:version1.0 + +## Tagging an image for a private repository + +To push an image to an private registry and not the central Docker +registry you must tag it with the registry hostname and port (if needed). + + docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0 + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based + on docker.io source material and internal work. diff --git a/contrib/man/md/docker-top.md b/contrib/man/md/docker-top.md new file mode 100644 index 0000000000..d2b2b88d24 --- /dev/null +++ b/contrib/man/md/docker-top.md @@ -0,0 +1,26 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-top - Lookup the running processes of a container + +# SYNOPSIS +**docker top** CONTAINER [ps-OPTION] + +# DESCRIPTION + +Look up the running process of the container. ps-OPTION can be any of the + options you would pass to a Linux ps command. + +# EXAMPLE + +Run **docker top** with the ps option of -x: + + $ sudo docker top 8601afda2b -x + PID TTY STAT TIME COMMAND + 16623 ? Ss 0:00 sleep 99999 + + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-wait.md b/contrib/man/md/docker-wait.md new file mode 100644 index 0000000000..165b9e812b --- /dev/null +++ b/contrib/man/md/docker-wait.md @@ -0,0 +1,22 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker-wait - Block until a container stops, then print its exit code. + +# SYNOPSIS +**docker wait** CONTAINER [CONTAINER...] + +# DESCRIPTION +Block until a container stops, then print its exit code. + +#EXAMPLE + + $ sudo docker run -d fedora sleep 99 + 079b83f558a2bc52ecad6b2a5de13622d584e6bb1aea058c11b36511e85e7622 + $ sudo docker wait 079b83f558a2bc + 0 + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) + based on docker.io source material and internal work. diff --git a/contrib/man/md/docker.md b/contrib/man/md/docker.md new file mode 100644 index 0000000000..02c541262b --- /dev/null +++ b/contrib/man/md/docker.md @@ -0,0 +1,184 @@ +% DOCKER(1) Docker User Manuals +% William Henry +% APRIL 2014 +# NAME +docker \- Docker image and container command line interface + +# SYNOPSIS +**docker** [OPTIONS] COMMAND [arg...] + +# DESCRIPTION +**docker** has two distinct functions. It is used for starting the Docker +daemon and to run the CLI (i.e., to command the daemon to manage images, +containers etc.) So **docker** is both a server, as a deamon, and a client +to the daemon, through the CLI. + +To run the Docker deamon you do not specify any of the commands listed below but +must specify the **-d** option. The other options listed below are for the +daemon only. + +The Docker CLI has over 30 commands. The commands are listed below and each has +its own man page which explain usage and arguements. + +To see the man page for a command run **man docker **. + +# OPTIONS +**-D**=*ture*|*false* + Enable debug mode. Default is false. + +**-H**, **--host**=[unix:///var/run/docker.sock]: tcp://[host[:port]] to bind or +unix://[/path/to/socket] to use. + Enable both the socket support and TCP on localhost. When host=[0.0.0.0], +port=[4243] or path =[/var/run/docker.sock] is omitted, default values are used. + +**--api-enable-cors**=*true*|*false* + Enable CORS headers in the remote API. Default is false. + +**-b**="" + Attach containers to a pre\-existing network bridge; use 'none' to disable container networking + +**--bip**="" + Use the provided CIDR notation address for the dynamically created bridge (docker0); Mutually exclusive of \-b + +**-d**=*true*|*false* + Enable daemon mode. Default is false. + +**--dns**="" + Force Docker to use specific DNS servers + +**-g**="" + Path to use as the root of the Docker runtime. Default is `/var/lib/docker`. + +**--icc**=*true*|*false* + Enable inter\-container communication. Default is true. + +**--ip**="" + Default IP address to use when binding container ports. Default is `0.0.0.0`. + +**--iptables**=*true*|*false* + Disable Docker's addition of iptables rules. Default is true. + +**--mtu**=VALUE + Set the containers network mtu. Default is `1500`. + +**-p**="" + Path to use for daemon PID file. Default is `/var/run/docker.pid` + +**-r**=*true*|*false* + Restart previously running containers. Default is true. + +**-s**="" + Force the Docker runtime to use a specific storage driver. + +**-v**=*true*|*false* + Print version information and quit. Default is false. + +# COMMANDS +**docker-attach(1)** + Attach to a running container + +**docker-build(1)** + Build a container from a Dockerfile + +**docker-commit(1)** + Create a new image from a container's changes + +**docker-cp(1)** + Copy files/folders from the containers filesystem to the host at path + +**docker-diff(1)** + Inspect changes on a container's filesystem + + +**docker-events(1)** + Get real time events from the server + +**docker-export(1)** + Stream the contents of a container as a tar archive + +**docker-history(1)** + Show the history of an image + +**docker-images(1)** + List images + +**docker-import(1)** + Create a new filesystem image from the contents of a tarball + +**docker-info(1)** + Display system-wide information + +**docker-inspect(1)** + Return low-level information on a container + +**docker-kill(1)** + Kill a running container (which includes the wrapper process and everything +inside it) + +**docker-load(1)** + Load an image from a tar archive + +**docker-login(1)** + Register or Login to a Docker registry server + +**docker-logs(1)** + Fetch the logs of a container + +**docker-port(1)** + Lookup the public-facing port which is NAT-ed to PRIVATE_PORT + +**docker-ps(1)** + List containers + +**docker-pull(1)** + Pull an image or a repository from a Docker registry server + +**docker-push(1)** + Push an image or a repository to a Docker registry server + +**docker-restart(1)** + Restart a running container + +**docker-rm(1)** + Remove one or more containers + +**docker-rmi(1)** + Remove one or more images + +**docker-run(1)** + Run a command in a new container + +**docker-save(1)** + Save an image to a tar archive + +**docker-search(1)** + Search for an image in the Docker index + +**docker-start(1)** + Start a stopped container + +**docker-stop(1)** + Stop a running container + +**docker-tag(1)** + Tag an image into a repository + +**docker-top(1)** + Lookup the running processes of a container + +**version** + Show the Docker version information + +**docker-wait(1)** + Block until a container stops, then print its exit code + +# EXAMPLES + +For specific examples please see the man page for the specific Docker command. +For example: + + man docker run + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based + on docker.io source material and internal work. diff --git a/contrib/man/md/md2man-all.sh b/contrib/man/md/md2man-all.sh new file mode 100755 index 0000000000..4dee31aeff --- /dev/null +++ b/contrib/man/md/md2man-all.sh @@ -0,0 +1,9 @@ +#!/bin/bash +echo "md2man-all: about to mkdir ../man1" +mkdir -p /pandoc/man1 +echo "md2man-all: changing to /pandoc/md" +cd /pandoc/md +echo "md2man-all: about to convert files" +for FILE in docker*.md; do echo $FILE; pandoc -s -t man $FILE -o /pandoc/man1/"${FILE%.*}".1; done +echo "md2man-all: List files:" +ls -l /pandoc/man1 From 67a73917c10bfaa265698f3bb054f9af43c61d5d Mon Sep 17 00:00:00 2001 From: William Henry Date: Wed, 16 Apr 2014 13:34:12 -0600 Subject: [PATCH 2/9] Added a tag to FROM fedora (fedora:20) Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) --- contrib/man/md/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/man/md/Dockerfile b/contrib/man/md/Dockerfile index fa148fcdaf..438227df89 100644 --- a/contrib/man/md/Dockerfile +++ b/contrib/man/md/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora +FROM fedora:20 MAINTAINER ipbabble # Update and install pandoc RUN yum -y update; yum clean all; From e55ed741c24fe9e974d08f4893c79752fb279dc4 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 16 Apr 2014 14:15:57 -0600 Subject: [PATCH 3/9] Update hack/make/ubuntu to use the new markdown-based manpages This also removes all the old man pages, .gitignores their directory, and updates the md2man-all.sh script to be easier to read and more friendly to being called within hack/make/ubuntu. Docker-DCO-1.1-Signed-off-by: Andrew Page (github: tianon) --- Dockerfile | 1 + contrib/man/.gitignore | 2 + contrib/man/man1/docker-attach.1 | 56 ------ contrib/man/man1/docker-build.1 | 65 ------- contrib/man/man1/docker-images.1 | 84 --------- contrib/man/man1/docker-info.1 | 39 ----- contrib/man/man1/docker-inspect.1 | 237 ------------------------- contrib/man/man1/docker-rm.1 | 45 ----- contrib/man/man1/docker-rmi.1 | 29 ---- contrib/man/man1/docker-run.1 | 277 ------------------------------ contrib/man/man1/docker-tag.1 | 49 ------ contrib/man/man1/docker.1 | 172 ------------------- contrib/man/md/md2man-all.sh | 23 ++- hack/make/ubuntu | 1 + 14 files changed, 19 insertions(+), 1061 deletions(-) create mode 100644 contrib/man/.gitignore delete mode 100644 contrib/man/man1/docker-attach.1 delete mode 100644 contrib/man/man1/docker-build.1 delete mode 100644 contrib/man/man1/docker-images.1 delete mode 100644 contrib/man/man1/docker-info.1 delete mode 100644 contrib/man/man1/docker-inspect.1 delete mode 100644 contrib/man/man1/docker-rm.1 delete mode 100644 contrib/man/man1/docker-rmi.1 delete mode 100644 contrib/man/man1/docker-run.1 delete mode 100644 contrib/man/man1/docker-tag.1 delete mode 100644 contrib/man/man1/docker.1 diff --git a/Dockerfile b/Dockerfile index ab82dfa700..be2233ff87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \ libcap-dev \ libsqlite3-dev \ mercurial \ + pandoc \ reprepro \ ruby1.9.1 \ ruby1.9.1-dev \ diff --git a/contrib/man/.gitignore b/contrib/man/.gitignore new file mode 100644 index 0000000000..c2c63b5d2e --- /dev/null +++ b/contrib/man/.gitignore @@ -0,0 +1,2 @@ +# these are generated by the md/md2man-all.sh script +man* diff --git a/contrib/man/man1/docker-attach.1 b/contrib/man/man1/docker-attach.1 deleted file mode 100644 index 94198933e3..0000000000 --- a/contrib/man/man1/docker-attach.1 +++ /dev/null @@ -1,56 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-attach.1 -.\" -.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" -.SH NAME -docker-attach \- Attach to a running container -.SH SYNOPSIS -.B docker attach -\fB--no-stdin\fR[=\fIfalse\fR] -\fB--sig-proxy\fR[=\fItrue\fR] -container -.SH DESCRIPTION -If you \fBdocker run\fR a container in detached mode (\fB-d\fR), you can reattach to the detached container with \fBdocker attach\fR using the container's ID or name. -.sp -You can detach from the container again (and leave it running) with CTRL-c (for a quiet exit) or CTRL-\ to get a stacktrace of the Docker client when it quits. When you detach from the container the exit code will be returned to the client. -.SH "OPTIONS" -.TP -.B --no-stdin=\fItrue\fR|\fIfalse\fR -When set to true, do not attach to stdin. The default is \fIfalse\fR. -.TP -.B --sig-proxy=\fItrue\fR|\fIfalse\fR -When set to true, proxify all received signal to the process (even in non-tty mode). The default is \fItrue\fR. -.sp -.SH EXAMPLES -.sp -.PP -.B Attaching to a container -.TP -In this example the top command is run inside a container, from an image called fedora, in detached mode. The ID from the container is passed into the \fBdocker attach\fR command: -.sp -.nf -.RS -# ID=$(sudo docker run -d fedora /usr/bin/top -b) -# sudo docker attach $ID -top - 02:05:52 up 3:05, 0 users, load average: 0.01, 0.02, 0.05 -Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie -Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st -Mem: 373572k total, 355560k used, 18012k free, 27872k buffers -Swap: 786428k total, 0k used, 786428k free, 221740k cached - -PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND -1 root 20 0 17200 1116 912 R 0 0.3 0:00.03 top - -top - 02:05:55 up 3:05, 0 users, load average: 0.01, 0.02, 0.05 -Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie -Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st -Mem: 373572k total, 355244k used, 18328k free, 27872k buffers -Swap: 786428k total, 0k used, 786428k free, 221776k cached - -PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND -1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top -.RE -.fi -.sp -.SH HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-build.1 b/contrib/man/man1/docker-build.1 deleted file mode 100644 index 6d0a4c2e38..0000000000 --- a/contrib/man/man1/docker-build.1 +++ /dev/null @@ -1,65 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-build.1 -.\" -.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" -.SH NAME -docker-build \- Build a container image from a Dockerfile source at PATH -.SH SYNOPSIS -.B docker build -[\fB--no-cache\fR[=\fIfalse\fR] -[\fB-q\fR|\fB--quiet\fR[=\fIfalse\fR] -[\fB--rm\fR[=\fitrue\fR]] -[\fB-t\fR|\fB--tag\fR=\fItag\fR] -PATH | URL | - -.SH DESCRIPTION -This will read the Dockerfile from the directory specified in \fBPATH\fR. It also sends any other files and directories found in the current directory to the Docker daemon. The contents of this directory would be used by ADD command found within the Dockerfile. -Warning, this will send a lot of data to the Docker daemon if the current directory contains a lot of data. -If the absolute path is provided instead of ‘.’, only the files and directories required by the ADD commands from the Dockerfile will be added to the context and transferred to the Docker daemon. -.sp -When a single Dockerfile is given as URL, then no context is set. When a Git repository is set as URL, the repository is used as context. -.SH "OPTIONS" -.TP -.B -q, --quiet=\fItrue\fR|\fIfalse\fR -When set to true, suppress verbose build output. Default is \fIfalse\fR. -.TP -.B --rm=\fItrue\fr|\fIfalse\fR -When true, remove intermediate containers that are created during the build process. The default is true. -.TP -.B -t, --tag=\fItag\fR -Tag to be applied to the resulting image on successful completion of the build. -.TP -.B --no-cache=\fItrue\fR|\fIfalse\fR -When set to true, do not use a cache when building the image. The default is \fIfalse\fR. -.sp -.SH EXAMPLES -.sp -.sp -.B Building an image from current directory -.TP -USing a Dockerfile, Docker images are built using the build command: -.sp -.RS -docker build . -.RE -.sp -If, for some reasone, you do not what to remove the intermediate containers created during the build you must set--rm=false. -.sp -.RS -docker build --rm=false . -.sp -.RE -.sp -A good practice is to make a subdirectory with a related name and create the Dockerfile in that directory. E.g. a directory called mongo may contain a Dockerfile for a MongoDB image, or a directory called httpd may contain an Dockerfile for an Apache web server. -.sp -It is also good practice to add the files required for the image to the subdirectory. These files will be then specified with the `ADD` instruction in the Dockerfile. Note: if you include a tar file, which is good practice, then Docker will automatically extract the contents of the tar file specified in the `ADD` instruction into the specified target. -.sp -.B Building an image container using a URL -.TP -This will clone the Github repository and use it as context. The Dockerfile at the root of the repository is used as Dockerfile. This only works if the Github repository is a dedicated repository. Note that you can specify an arbitrary Git repository by using the ‘git://’ schema. -.sp -.RS -docker build github.com/scollier/Fedora-Dockerfiles/tree/master/apache -.RE -.sp -.SH HISTORY -March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-images.1 b/contrib/man/man1/docker-images.1 deleted file mode 100644 index d88e2446c8..0000000000 --- a/contrib/man/man1/docker-images.1 +++ /dev/null @@ -1,84 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-images.1 -.\" -.TH "DOCKER" "1" "April 2014" "0.1" "Docker" -.SH NAME -docker-images \- List the images in the local repository -.SH SYNOPSIS -.B docker images -[\fB-a\fR|\fB--all\fR=\fIfalse\fR] -[\fB--no-trunc\fR[=\fIfalse\fR] -[\fB-q\fR|\fB--quiet\fR[=\fIfalse\fR] -[\fB-t\fR|\fB--tree\fR=\fIfalse\fR] -[\fB-v\fR|\fB--viz\fR=\fIfalse\fR] -[NAME] -.SH DESCRIPTION -This command lists the images stored in the local Docker repository. -.sp -By default, intermediate images, used during builds, are not listed. Some of the output, e.g. image ID, is truncated, for space reasons. However the truncated image ID, and often the first few characters, are enough to be used in other Docker commands that use the image ID. The output includes repository, tag, image ID, date created and the virtual size. -.sp -The title REPOSITORY for the first title may seem confusing. It is essentially the image name. However, because you can tag a specific image, and multiple tags (image instances) can be associated with a single name, the name is really a repository for all tagged images of the same name. -.SH "OPTIONS" -.TP -.B -a, --all=\fItrue\fR|\fIfalse\fR -When set to true, also include all intermediate images in the list. The default is false. -.TP -.B --no-trunc=\fItrue\fR|\fIfalse\fR -When set to true, list the full image ID and not the truncated ID. The default is false. -.TP -.B -q, --quiet=\fItrue\fR|\fIfalse\fR -When set to true, list the complete image ID as part of the output. The default is false. -.TP -.B -t, --tree=\fItrue\fR|\fIfalse\fR -When set to true, list the images in a tree dependency tree (hierarchy) format. The default is false. -.TP -.B -v, --viz=\fItrue\fR|\fIfalse\fR -When set to true, list the graph in graphviz format. The default is \fIfalse\fR. -.sp -.SH EXAMPLES -.sp -.B Listing the images -.TP -To list the images in a local repository (not the registry) run: -.sp -.RS -docker images -.RE -.sp -The list will contain the image repository name, a tag for the image, and an image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG, IMAGE ID, CREATED, and VIRTUAL SIZE. -.sp -To get a verbose list of images which contains all the intermediate images used in builds use \fB-a\fR: -.sp -.RS -docker images -a -.RE -.sp -.B List images dependency tree hierarchy -.TP -To list the images in the local repository (not the registry) in a dependency tree format then use the \fB-t\fR|\fB--tree=true\fR option. -.sp -.RS -docker images -t -.RE -.sp -This displays a staggered hierarchy tree where the less indented image is the oldest with dependent image layers branching inward (to the right) on subsequent lines. The newest or top level image layer is listed last in any tree branch. -.sp -.B List images in GraphViz format -.TP -To display the list in a format consumable by a GraphViz tools run with \fB-v\fR|\fB--viz=true\fR. For example to produce a .png graph file of the hierarchy use: -.sp -.RS -docker images --viz | dot -Tpng -o docker.png -.sp -.RE -.sp -.B Listing only the shortened image IDs -.TP -Listing just the shortened image IDs. This can be useful for some automated tools. -.sp -.RS -docker images -q -.RE -.sp -.SH HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-info.1 b/contrib/man/man1/docker-info.1 deleted file mode 100644 index dca2600af0..0000000000 --- a/contrib/man/man1/docker-info.1 +++ /dev/null @@ -1,39 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-info.1 -.\" -.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" -.SH NAME -docker-info \- Display system wide information -.SH SYNOPSIS -.B docker info -.SH DESCRIPTION -This command displays system wide information regarding the Docker installation. Information displayed includes the number of containers and images, pool name, data file, metadata file, data space used, total data space, metadata space used, total metadata space, execution driver, and the kernel version. -.sp -The data file is where the images are stored and the metadata file is where the meta data regarding those images are stored. When run for the first time Docker allocates a certain amount of data space and meta data space from the space available on the volume where /var/lib/docker is mounted. -.SH "OPTIONS" -There are no available options. -.sp -.SH EXAMPLES -.sp -.B Display Docker system information -.TP -Here is a sample output: -.sp -.RS - # docker info - Containers: 18 - Images: 95 - Storage Driver: devicemapper - Pool Name: docker-8:1-170408448-pool - Data file: /var/lib/docker/devicemapper/devicemapper/data - Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata - Data Space Used: 9946.3 Mb - Data Space Total: 102400.0 Mb - Metadata Space Used: 9.9 Mb - Metadata Space Total: 2048.0 Mb - Execution Driver: native-0.1 - Kernel Version: 3.10.0-116.el7.x86_64 -.RE -.sp -.SH HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-inspect.1 b/contrib/man/man1/docker-inspect.1 deleted file mode 100644 index 3d1e18ba53..0000000000 --- a/contrib/man/man1/docker-inspect.1 +++ /dev/null @@ -1,237 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-inspect.1 -.\" -.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" -.SH NAME -docker-inspect \- Return low-level information on a container/image -.SH SYNOPSIS -.B docker inspect -[\fB-f\fR|\fB--format\fR="" -CONTAINER|IMAGE [CONTAINER|IMAGE...] -.SH DESCRIPTION -This displays all the information available in Docker for a given container or image. By default, this will render all results in a JSON array. If a format is specified, the given template will be executed for each result. -.SH "OPTIONS" -.TP -.B -f, --format="" -The text/template package of Go describes all the details of the format. See examples section -.SH EXAMPLES -.sp -.PP -.B Getting information on a container -.TP -To get information on a container use it's ID or instance name -.sp -.fi -.RS -#docker inspect 1eb5fabf5a03 - -[{ - "ID": "1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b", - "Created": "2014-04-04T21:33:52.02361335Z", - "Path": "/usr/sbin/nginx", - "Args": [], - "Config": { - "Hostname": "1eb5fabf5a03", - "Domainname": "", - "User": "", - "Memory": 0, - "MemorySwap": 0, - "CpuShares": 0, - "AttachStdin": false, - "AttachStdout": false, - "AttachStderr": false, - "PortSpecs": null, - "ExposedPorts": { - "80/tcp": {} - }, - "Tty": true, - "OpenStdin": false, - "StdinOnce": false, - "Env": [ - "HOME=/", - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - ], - "Cmd": [ - "/usr/sbin/nginx" - ], - "Dns": null, - "DnsSearch": null, - "Image": "summit/nginx", - "Volumes": null, - "VolumesFrom": "", - "WorkingDir": "", - "Entrypoint": null, - "NetworkDisabled": false, - "OnBuild": null, - "Context": { - "mount_label": "system_u:object_r:svirt_sandbox_file_t:s0:c0,c650", - "process_label": "system_u:system_r:svirt_lxc_net_t:s0:c0,c650" - } - }, - "State": { - "Running": true, - "Pid": 858, - "ExitCode": 0, - "StartedAt": "2014-04-04T21:33:54.16259207Z", - "FinishedAt": "0001-01-01T00:00:00Z", - "Ghost": false - }, - "Image": "df53773a4390e25936f9fd3739e0c0e60a62d024ea7b669282b27e65ae8458e6", - "NetworkSettings": { - "IPAddress": "172.17.0.2", - "IPPrefixLen": 16, - "Gateway": "172.17.42.1", - "Bridge": "docker0", - "PortMapping": null, - "Ports": { - "80/tcp": [ - { - "HostIp": "0.0.0.0", - "HostPort": "80" - } - ] - } - }, - "ResolvConfPath": "/etc/resolv.conf", - "HostnamePath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/hostname", - "HostsPath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/hosts", - "Name": "/ecstatic_ptolemy", - "Driver": "devicemapper", - "ExecDriver": "native-0.1", - "Volumes": {}, - "VolumesRW": {}, - "HostConfig": { - "Binds": null, - "ContainerIDFile": "", - "LxcConf": [], - "Privileged": false, - "PortBindings": { - "80/tcp": [ - { - "HostIp": "0.0.0.0", - "HostPort": "80" - } - ] - }, - "Links": null, - "PublishAllPorts": false, - "DriverOptions": { - "lxc": null - }, - "CliAddress": "" - } -.RE -.nf -.sp -.B Getting the IP address of a container instance -.TP -To get the IP address of a container use: -.sp -.fi -.RS -# docker inspect --format='{{.NetworkSettings.IPAddress}}' 1eb5fabf5a03 - -172.17.0.2 -.RE -.nf -.sp -.B Listing all port bindings -.TP -One can loop over arrays and maps in the results to produce simple text output: -.sp -.fi -.RS -# docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' 1eb5fabf5a03 - -80/tcp -> 80 -.RE -.nf -.sp -.B Getting information on an image -.TP -Use an image's ID or name (e.g. repository/name[:tag]) to get information on it. -.sp -.fi -.RS -docker inspect 58394af37342 -[{ - "id": "58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9", - "parent": "8abc22fbb04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", - "created": "2014-02-03T16:10:40.500814677Z", - "container": "f718f19a28a5147da49313c54620306243734bafa63c76942ef6f8c4b4113bc5", - "container_config": { - "Hostname": "88807319f25e", - "Domainname": "", - "User": "", - "Memory": 0, - "MemorySwap": 0, - "CpuShares": 0, - "AttachStdin": false, - "AttachStdout": false, - "AttachStderr": false, - "PortSpecs": null, - "ExposedPorts": null, - "Tty": false, - "OpenStdin": false, - "StdinOnce": false, - "Env": [ - "HOME=/", - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - ], - "Cmd": [ - "/bin/sh", - "-c", - "#(nop) ADD fedora-20-medium.tar.xz in /" - ], - "Dns": null, - "DnsSearch": null, - "Image": "8abc22fbb04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", - "Volumes": null, - "VolumesFrom": "", - "WorkingDir": "", - "Entrypoint": null, - "NetworkDisabled": false, - "OnBuild": null, - "Context": null - }, - "docker_version": "0.6.3", - "author": "Lokesh Mandvekar \u003clsm5@redhat.com\u003e - ./buildcontainers.sh", - "config": { - "Hostname": "88807319f25e", - "Domainname": "", - "User": "", - "Memory": 0, - "MemorySwap": 0, - "CpuShares": 0, - "AttachStdin": false, - "AttachStdout": false, - "AttachStderr": false, - "PortSpecs": null, - "ExposedPorts": null, - "Tty": false, - "OpenStdin": false, - "StdinOnce": false, - "Env": [ - "HOME=/", - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - ], - "Cmd": null, - "Dns": null, - "DnsSearch": null, - "Image": "8abc22fbb04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", - "Volumes": null, - "VolumesFrom": "", - "WorkingDir": "", - "Entrypoint": null, - "NetworkDisabled": false, - "OnBuild": null, - "Context": null - }, - "architecture": "x86_64", - "Size": 385520098 -}] -.RE -.nf -.sp -.SH HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-rm.1 b/contrib/man/man1/docker-rm.1 deleted file mode 100644 index 4ec84571bb..0000000000 --- a/contrib/man/man1/docker-rm.1 +++ /dev/null @@ -1,45 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-rm.1 -.\" -.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" -.SH NAME -docker-rm \- Remove one or more containers. -.SH SYNOPSIS -.B docker rm -[\fB-f\fR|\fB--force\fR[=\fIfalse\fR] -[\fB-l\fR|\fB--link\fR[=\fIfalse\fR] -[\fB-v\fR|\fB--volumes\fR[=\fIfalse\fR] -CONTAINER [CONTAINER...] -.SH DESCRIPTION -This will remove one or more containers from the host node. The container name or ID can be used. This does not remove images. You cannot remove a running container unless you use the \fB-f\fR option. To see all containers on a host use the \fBdocker ps -a\fR command. -.SH "OPTIONS" -.TP -.B -f, --force=\fItrue\fR|\fIfalse\fR -When set to true, force the removal of the container. The default is \fIfalse\fR. -.TP -.B -l, --link=\fItrue\fR|\fIfalse\fR -When set to true, remove the specified link and not the underlying container. The default is \fIfalse\fR. -.TP -.B -v, --volumes=\fItrue\fR|\fIfalse\fR -When set to true, remove the volumes associated to the container. The default is \fIfalse\fR. -.SH EXAMPLES -.sp -.PP -.B Removing a container using its ID -.TP -To remove a container using its ID, find either from a \fBdocker ps -a\fR command, or use the ID returned from the \fBdocker run\fR command, or retrieve it from a file used to store it using the \fBdocker run --cidfile\fR: -.sp -.RS -docker rm abebf7571666 -.RE -.sp -.B Removing a container using the container name: -.TP -The name of the container can be found using the \fBdocker ps -a\fR command. The use that name as follows: -.sp -.RS -docker rm hopeful_morse -.RE -.sp -.SH HISTORY -March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-rmi.1 b/contrib/man/man1/docker-rmi.1 deleted file mode 100644 index a4b5c05e7f..0000000000 --- a/contrib/man/man1/docker-rmi.1 +++ /dev/null @@ -1,29 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-run.1 -.\" -.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" -.SH NAME -docker-rmi \- Remove one or more images. -.SH SYNOPSIS -.B docker rmi -[\fB-f\fR|\fB--force\fR[=\fIfalse\fR] -IMAGE [IMAGE...] -.SH DESCRIPTION -This will remove one or more images from the host node. This does not remove images from a registry. You cannot remove an image of a running container unless you use the \fB-f\fR option. To see all images on a host use the \fBdocker images\fR command. -.SH "OPTIONS" -.TP -.B -f, --force=\fItrue\fR|\fIfalse\fR -When set to true, force the removal of the image. The default is \fIfalse\fR. -.SH EXAMPLES -.sp -.PP -.B Removing an image -.TP -Here is an example of removing and image: -.sp -.RS -docker rmi fedora/httpd -.RE -.sp -.SH HISTORY -March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-run.1 b/contrib/man/man1/docker-run.1 deleted file mode 100644 index ba191e1b40..0000000000 --- a/contrib/man/man1/docker-run.1 +++ /dev/null @@ -1,277 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-run.1 -.\" -.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" -.SH NAME -docker-run \- Run a process in an isolated container -.SH SYNOPSIS -.B docker run -[\fB-a\fR|\fB--attach\fR[=]] [\fB-c\fR|\fB--cpu-shares\fR[=0] [\fB-m\fR|\fB--memory\fR=\fImemory-limit\fR] -[\fB--cidfile\fR=\fIfile\fR] [\fB-d\fR|\fB--detach\fR[=\fIfalse\fR]] [\fB--dns\fR=\fIIP-address\fR] -[\fB--name\fR=\fIname\fR] [\fB-u\fR|\fB--user\fR=\fIusername\fR|\fIuid\fR] -[\fB--link\fR=\fIname\fR:\fIalias\fR] -[\fB-e\fR|\fB--env\fR=\fIenvironment\fR] [\fB--entrypoint\fR=\fIcommand\fR] -[\fB--expose\fR=\fIport\fR] [\fB-P\fR|\fB--publish-all\fR[=\fIfalse\fR]] -[\fB-p\fR|\fB--publish\fR=\fIport-mappping\fR] [\fB-h\fR|\fB--hostname\fR=\fIhostname\fR] -[\fB--rm\fR[=\fIfalse\fR]] [\fB--priviledged\fR[=\fIfalse\fR] -[\fB-i\fR|\fB--interactive\fR[=\fIfalse\fR] -[\fB-t\fR|\fB--tty\fR[=\fIfalse\fR]] [\fB--lxc-conf\fR=\fIoptions\fR] -[\fB-n\fR|\fB--networking\fR[=\fItrue\fR]] -[\fB-v\fR|\fB--volume\fR=\fIvolume\fR] [\fB--volumes-from\fR=\fIcontainer-id\fR] -[\fB-w\fR|\fB--workdir\fR=\fIdirectory\fR] [\fB--sig-proxy\fR[=\fItrue\fR]] -IMAGE [COMMAND] [ARG...] -.SH DESCRIPTION -.PP -Run a process in a new container. \fBdocker run\fR starts a process with its own file system, its own networking, and its own isolated process tree. The \fIIMAGE\fR which starts the process may define defaults related to the process that will be run in the container, the networking to expose, and more, but \fBdocker run\fR gives final control to the operator or administrator who starts the container from the image. For that reason \fBdocker run\fR has more options than any other docker command. - -If the \fIIMAGE\fR is not already loaded then \fBdocker run\fR will pull the \fIIMAGE\fR, and all image dependencies, from the repository in the same way running \fBdocker pull\fR \fIIMAGE\fR, before it starts the container from that image. - - -.SH "OPTIONS" - -.TP -.B -a, --attach=\fIstdin\fR|\fIstdout\fR|\fIstderr\fR -Attach to stdin, stdout or stderr. In foreground mode (the default when -d is not specified), \fBdocker run\fR can start the process in the container and attach the console to the process’s standard input, output, and standard error. It can even pretend to be a TTY (this is what most commandline executables expect) and pass along signals. The \fB-a\fR option can be set for each of stdin, stdout, and stderr. - -.TP -.B -c, --cpu-shares=0 -CPU shares in relative weight. You can increase the priority of a container with the -c option. By default, all containers run at the same priority and get 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 \fBdocker run\fR. - -.TP -.B -m, --memory=\fImemory-limit\fR -Allows you to constrain the memory available to a container. If the host supports swap memory, then the -m memory setting can be larger than physical RAM. The memory limit format: , where unit = b, k, m or g. - -.TP -.B --cidfile=\fIfile\fR -Write the container ID to the file specified. - -.TP -.B -d, --detach=\fItrue\fR|\fIfalse\fR -Detached mode. This runs the container in the background. It outputs the new container's id and and error messages. At any time you can run \fBdocker ps\fR in the other shell to view a list of the running containers. You can reattach to a detached container with \fBdocker attach\fR. If you choose to run a container in the detached mode, then you cannot use the -rm option. - -.TP -.B --dns=\fIIP-address\fR -Set custom DNS servers. This option can be used to override the DNS configuration passed to the container. Typically this is necessary when the host DNS configuration is invalid for the container (eg. 127.0.0.1). When this is the case the \fB-dns\fR flags is necessary for every run. - -.TP -.B -e, --env=\fIenvironment\fR -Set environment variables. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container. - -.TP -.B --entrypoint=\ficommand\fR -This option allows you to overwrite the default entrypoint of the image that is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND because it specifies what executable to run when the container starts, but it is (purposely) more difficult to override. The ENTRYPOINT gives a container its default nature or behavior, so that when you set an ENTRYPOINT you can run the container as if it were that binary, complete with default options, and you can pass in more options via the COMMAND. But, sometimes an operator may want to run something else inside the container, so you can override the default ENTRYPOINT at runtime by using a \fB--entrypoint\fR and a string to specify the new ENTRYPOINT. - -.TP -.B --expose=\fIport\fR -Expose a port from the container without publishing it to your host. A containers port can be exposed to other containers in three ways: 1) The developer can expose the port using the EXPOSE parameter of the Dockerfile, 2) the operator can use the \fB--expose\fR option with \fBdocker run\fR, or 3) the container can be started with the \fB--link\fR. - -.TP -.B -P, --publish-all=\fItrue\fR|\fIfalse\fR -When set to true publish all exposed ports to the host interfaces. The default is false. If the operator uses -P (or -p) then Docker will make the exposed port accessible on the host and the ports will be available to any client that can reach the host. To find the map between the host ports and the exposed ports, use \fBdocker port\fR. - -.TP -.B -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) - -.TP -.B -h , --hostname=\fIhostname\fR -Sets the container host name that is available inside the container. - -.TP -.B -i , --interactive=\fItrue\fR|\fIfalse\fR -When set to true, keep stdin open even if not attached. The default is false. - -.TP -.B --link=\fIname\fR:\fIalias\fR -Add link to another container. The format is name:alias. If the operator uses \fB--link\fR when starting the new client container, then the client container can access the exposed port via a private networking interface. Docker will set some environment variables in the client container to help indicate which interface and port to use. - -.TP -.B -n, --networking=\fItrue\fR|\fIfalse\fR -By default, all containers have networking enabled (true) and can make outgoing connections. The operator can disable networking with \fB--networking\fR to false. This disables all incoming and outgoing networking. In cases like this, I/O can only be performed through files or by using STDIN/STDOUT. - -Also by default, the container will use the same DNS servers as the host. but you canThe operator may override this with \fB-dns\fR. - -.TP -.B --name=\fIname\fR -Assign a name to the container. The operator can identify a container in three ways: -.sp -.nf -UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) -UUID short identifier (“f78375b1c487”) -Name (“jonah”) -.fi -.sp -The UUID identifiers come from the Docker daemon, and if a name is not assigned to the container with \fB--name\fR then the daemon will also generate a random string name. The name is useful when defining links (see \fB--link\fR) (or any other place you need to identify a container). This works for both background and foreground Docker containers. - -.TP -.B --privileged=\fItrue\fR|\fIfalse\fR -Give extended privileges to this container. By default, Docker containers are “unprivileged” (=false) and cannot, for example, run a Docker daemon inside the Docker container. This is because by default a container is not allowed to access any devices. A “privileged” container is given access to all devices. - -When the operator executes \fBdocker run -privileged\fR, Docker will enable access to all devices on the host as well as set some configuration in AppArmor (\fB???\fR) to allow the container nearly all the same access to the host as processes running outside of a container on the host. - -.TP -.B --rm=\fItrue\fR|\fIfalse\fR -If set to \fItrue\fR the container is automatically removed when it exits. The default is \fIfalse\fR. This option is incompatible with \fB-d\fR. - -.TP -.B --sig-proxy=\fItrue\fR|\fIfalse\fR -When set to true, proxify all received signals to the process (even in non-tty mode). The default is true. - -.TP -.B -t, --tty=\fItrue\fR|\fIfalse\fR -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 interactive shell. The default is value is false. - -.TP -.B -u, --user=\fIusername\fR,\fRuid\fR -Set a username or UID for the container. - -.TP -.B -v, --volume=\fIvolume\fR -Bind mount a volume to the container. The \fB-v\fR option can be used one or more times to add one or more mounts to a container. These mounts can then be used in other containers using the \fB--volumes-from\fR option. See examples. - -.TP -.B --volumes-from=\fIcontainer-id\fR -Will mount volumes from the specified container identified by container-id. Once a volume is mounted in a one container it can be shared with other containers using the \fB--volumes-from\fR option when running those other containers. The volumes can be shared even if the original container with the mount is not running. - -.TP -.B -w, --workdir=\fIdirectory\fR -Working directory inside the container. The default working directory for running binaries within a container is the root directory (/). The developer can set a different default with the Dockerfile WORKDIR instruction. The operator can override the working directory by using the \fB-w\fR option. - -.TP -.B IMAGE: -The image name or ID. - -.TP -.B COMMAND: -The command or program to run inside the image. - -.TP -.B ARG: -The arguments for the command to be run in the container. - -.SH EXAMPLES -.sp -.sp -.B Exposing log messages from the container to the host's log -.TP -If you want messages that are logged in your container to show up in the host's syslog/journal then you should bind mount the /var/log directory as follows. -.sp -.RS -docker run -v /dev/log:/dev/log -i -t fedora /bin/bash -.RE -.sp -From inside the container you can test this by sending a message to the log. -.sp -.RS -logger "Hello from my container" -.sp -.RE -Then exit and check the journal. -.RS -.sp -exit -.sp -journalctl -b | grep hello -.RE -.sp -This should list the message sent to logger. -.sp -.B Attaching to one or more from STDIN, STDOUT, STDERR -.TP -If you do not specify -a then Docker will attach everything (stdin,stdout,stderr). You can specify to which of the three standard streams (stdin, stdout, stderr) you’d like to connect instead, as in: -.sp -.RS -docker run -a stdin -a stdout -i -t fedora /bin/bash -.RE -.sp -.B Linking Containers -.TP -The link feature allows multiple containers to communicate with each other. For example, a container whose Dockerfile has exposed port 80 can be run and named as follows: -.sp -.RS -docker run --name=link-test -d -i -t fedora/httpd -.RE -.sp -.TP -A second container, in this case called linker, can communicate with the httpd container, named link-test, by running with the \fB--link=:\fR -.sp -.RS -docker run -t -i --link=link-test:lt --name=linker fedora /bin/bash -.RE -.sp -.TP -Now the container linker is linked to container link-test with the alias lt. Running the \fBenv\fR command in the linker container shows environment variables with the LT (alias) context (\fBLT_\fR) -.sp -.nf -.RS -# env -HOSTNAME=668231cb0978 -TERM=xterm -LT_PORT_80_TCP=tcp://172.17.0.3:80 -LT_PORT_80_TCP_PORT=80 -LT_PORT_80_TCP_PROTO=tcp -LT_PORT=tcp://172.17.0.3:80 -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -PWD=/ -LT_NAME=/linker/lt -SHLVL=1 -HOME=/ -LT_PORT_80_TCP_ADDR=172.17.0.3 -_=/usr/bin/env -.RE -.fi -.sp -.TP -When linking two containers Docker will use the exposed ports of the container to create a secure tunnel for the parent to access. -.TP -.sp -.B Mapping Ports for External Usage -.TP -The exposed port of an application can be mapped to a host port using the \fB-p\fR flag. For example a httpd port 80 can be mapped to the host port 8080 using the following: -.sp -.RS -docker run -p 8080:80 -d -i -t fedora/httpd -.RE -.sp -.TP -.B Creating and Mounting a Data Volume Container -.TP -Many applications require the sharing of persistent data across several containers. Docker allows you to create a Data Volume Container that other containers can mount from. For example, create a named container that contains directories /var/volume1 and /tmp/volume2. The image will need to contain these directories so a couple of RUN mkdir instructions might be required for you fedora-data image: -.sp -.RS -docker run --name=data -v /var/volume1 -v /tmp/volume2 -i -t fedora-data true -.sp -docker run --volumes-from=data --name=fedora-container1 -i -t fedora bash -.RE -.sp -.TP -Multiple -volumes-from parameters will bring together multiple data volumes from multiple containers. And it's possible to mount the volumes that came from the DATA container in yet another container via the fedora-container1 intermidiery container, allowing to abstract the actual data source from users of that data: -.sp -.RS -docker run --volumes-from=fedora-container1 --name=fedora-container2 -i -t fedora bash -.RE -.TP -.sp -.B Mounting External Volumes -.TP -To mount a host directory as a container volume, specify the absolute path to the directory and the absolute path for the container directory separated by a colon: -.sp -.RS -docker run -v /var/db:/data1 -i -t fedora bash -.RE -.sp -.TP -When using SELinux, be aware that the host has no knowledge of container SELinux policy. Therefore, in the above example, if SELinux policy is enforced, the /var/db directory is not writable to the container. A "Permission Denied" message will occur and an avc: message in the host's syslog. -.sp -.TP -To work around this, at time of writing this man page, the following command needs to be run in order for the proper SELinux policy type label to be attached to the host directory: -.sp -.RS -chcon -Rt svirt_sandbox_file_t /var/db -.RE -.sp -.TP -Now, writing to the /data1 volume in the container will be allowed and the changes will also be reflected on the host in /var/db. -.sp -.SH HISTORY -March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker-tag.1 b/contrib/man/man1/docker-tag.1 deleted file mode 100644 index eaff32cebd..0000000000 --- a/contrib/man/man1/docker-tag.1 +++ /dev/null @@ -1,49 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker-tag.1 -.\" -.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" -.SH NAME -docker-tag \- Tag an image in the repository -.SH SYNOPSIS -.B docker tag -[\fB-f\fR|\fB--force\fR[=\fIfalse\fR] -\fBIMAGE\fR [REGISTRYHOST/][USERNAME/]NAME[:TAG] -.SH DESCRIPTION -This will tag an image in the repository. -.SH "OPTIONS" -.TP -.B -f, --force=\fItrue\fR|\fIfalse\fR -When set to true, force the tag name. The default is \fIfalse\fR. -.TP -.B REGISTRYHOST: -The hostname of the registry if required. This may also include the port separated by a ':' -.TP -.B USERNAME: -The username or other qualifying identifier for the image. -.TP -.B NAME: -The image name. -.TP -.B TAG: -The tag you are assigning to the image. -.SH EXAMPLES -.sp -.PP -.B Tagging an image -.TP -Here is an example where an image is tagged with the tag 'Version-1.0' : -.sp -.RS -docker tag 0e5574283393 fedora/httpd:Version-1.0 -.RE -.sp -.B Tagging an image for an internal repository -.TP -To push an image to an internal Registry and not the default docker.io based registry you must tag it with the registry hostname and port (if needed). -.sp -.RS -docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0 -.RE -.sp -.SH HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/man1/docker.1 b/contrib/man/man1/docker.1 deleted file mode 100644 index 4a36e5baf5..0000000000 --- a/contrib/man/man1/docker.1 +++ /dev/null @@ -1,172 +0,0 @@ -.\" Process this file with -.\" nroff -man -Tascii docker.1 -.\" -.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" -.SH NAME -docker \- Docker image and container command line interface -.SH SYNOPSIS -.B docker [OPTIONS] [COMMAND] [arg...] -.SH DESCRIPTION -\fBdocker\fR has two distinct functions. It is used for starting the Docker daemon and to run the CLI (i.e., to command the daemon to manage images, containers etc.) So \fBdocker\fR is both a server as deamon and a client to the daemon through the CLI. -.sp -To run the Docker deamon you do not specify any of the commands listed below but must specify the \fB-d\fR option. The other options listed below are for the daemon only. -.sp -The Docker CLI has over 30 commands. The commands are listed below and each has its own man page which explain usage and arguements. -.sp -To see the man page for a command run \fBman docker \fR. -.SH "OPTIONS" -.B \-D=false: -Enable debug mode -.TP -.B\-H=[unix:///var/run/docker.sock]: tcp://[host[:port]] to bind or unix://[/path/to/socket] to use. -When host=[0.0.0.0], port=[4243] or path -=[/var/run/docker.sock] is omitted, default values are used. -.TP -.B \-\-api-enable-cors=false -Enable CORS headers in the remote API -.TP -.B \-b="" -Attach containers to a pre\-existing network bridge; use 'none' to disable container networking -.TP -.B \-\-bip="" -Use the provided CIDR notation address for the dynamically created bridge (docker0); Mutually exclusive of \-b -.TP -.B \-d=false -Enable daemon mode -.TP -.B \-\-dns="" -Force Docker to use specific DNS servers -.TP -.B \-g="/var/lib/docker" -Path to use as the root of the Docker runtime -.TP -.B \-\-icc=true -Enable inter\-container communication -.TP -.B \-\-ip="0.0.0.0" -Default IP address to use when binding container ports -.TP -.B \-\-iptables=true -Disable Docker's addition of iptables rules -.TP -.B \-\-mtu=1500 -Set the containers network mtu -.TP -.B \-p="/var/run/docker.pid" -Path to use for daemon PID file -.TP -.B \-r=true -Restart previously running containers -.TP -.B \-s="" -Force the Docker runtime to use a specific storage driver -.TP -.B \-v=false -Print version information and quit -.SH "COMMANDS" -.TP -.B attach -Attach to a running container -.TP -.B build -Build a container from a Dockerfile -.TP -.B commit -Create a new image from a container's changes -.TP -.B cp -Copy files/folders from the containers filesystem to the host at path -.TP -.B diff -Inspect changes on a container's filesystem - -.TP -.B events -Get real time events from the server -.TP -.B export -Stream the contents of a container as a tar archive -.TP -.B history -Show the history of an image -.TP -.B images -List images -.TP -.B import -Create a new filesystem image from the contents of a tarball -.TP -.B info -Display system-wide information -.TP -.B insert -Insert a file in an image -.TP -.B inspect -Return low-level information on a container -.TP -.B kill -Kill a running container (which includes the wrapper process and everything inside it) -.TP -.B load -Load an image from a tar archive -.TP -.B login -Register or Login to a Docker registry server -.TP -.B logs -Fetch the logs of a container -.TP -.B port -Lookup the public-facing port which is NAT-ed to PRIVATE_PORT -.TP -.B ps -List containers -.TP -.B pull -Pull an image or a repository from a Docker registry server -.TP -.B push -Push an image or a repository to a Docker registry server -.TP -.B restart -Restart a running container -.TP -.B rm -Remove one or more containers -.TP -.B rmi -Remove one or more images -.TP -.B run -Run a command in a new container -.TP -.B save -Save an image to a tar archive -.TP -.B search -Search for an image in the Docker index -.TP -.B start -Start a stopped container -.TP -.B stop -Stop a running container -.TP -.B tag -Tag an image into a repository -.TP -.B top -Lookup the running processes of a container -.TP -.B version -Show the Docker version information -.TP -.B wait -Block until a container stops, then print its exit code -.SH EXAMPLES -.sp -For specific examples please see the man page for the specific Docker command. -.sp -.SH HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/md/md2man-all.sh b/contrib/man/md/md2man-all.sh index 4dee31aeff..e482da647a 100755 --- a/contrib/man/md/md2man-all.sh +++ b/contrib/man/md/md2man-all.sh @@ -1,9 +1,16 @@ #!/bin/bash -echo "md2man-all: about to mkdir ../man1" -mkdir -p /pandoc/man1 -echo "md2man-all: changing to /pandoc/md" -cd /pandoc/md -echo "md2man-all: about to convert files" -for FILE in docker*.md; do echo $FILE; pandoc -s -t man $FILE -o /pandoc/man1/"${FILE%.*}".1; done -echo "md2man-all: List files:" -ls -l /pandoc/man1 +set -e + +# get into this script's directory +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +[ "$1" = '-q' ] || { + set -x + pwd +} + +mkdir -p ../man1 + +for FILE in docker*.md; do + pandoc -s -t man "$FILE" -o "../man1/${FILE%.*}.1" +done diff --git a/hack/make/ubuntu b/hack/make/ubuntu index d7a4b16473..ae0f8d6137 100644 --- a/hack/make/ubuntu +++ b/hack/make/ubuntu @@ -47,6 +47,7 @@ bundle_ubuntu() { cp contrib/completion/fish/docker.fish $DIR/etc/fish/completions/ # Include contributed man pages + contrib/man/md/md2man-all.sh -q manRoot="$DIR/usr/share/man" mkdir -p "$manRoot" for manDir in contrib/man/man*; do From 1b2b783b52d76c7dae2958e6c53dcc3e665cd2fb Mon Sep 17 00:00:00 2001 From: William Henry Date: Thu, 17 Apr 2014 09:36:58 -0600 Subject: [PATCH 4/9] Edits based on ostezer's feedback. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) --- contrib/man/md/README.md | 51 ++++--- contrib/man/md/docker-attach.md | 9 +- contrib/man/md/docker-build.md | 71 ++++++---- contrib/man/md/docker-commit.md | 8 +- contrib/man/md/docker-cp.md | 3 +- contrib/man/md/docker-diff.md | 4 +- contrib/man/md/docker-events.md | 6 +- contrib/man/md/docker-history.md | 2 +- contrib/man/md/docker-images.md | 37 +++-- contrib/man/md/docker-import.md | 10 +- contrib/man/md/docker-info.md | 7 +- contrib/man/md/docker-inspect.md | 27 ++-- contrib/man/md/docker-load.md | 4 +- contrib/man/md/docker-login.md | 9 +- contrib/man/md/docker-logs.md | 8 +- contrib/man/md/docker-port.md | 2 +- contrib/man/md/docker-ps.md | 10 +- contrib/man/md/docker-pull.md | 3 +- contrib/man/md/docker-push.md | 12 +- contrib/man/md/docker-restart.md | 5 +- contrib/man/md/docker-rm.md | 12 +- contrib/man/md/docker-rmi.md | 8 +- contrib/man/md/docker-run.md | 232 ++++++++++++++++--------------- contrib/man/md/docker-save.md | 5 +- contrib/man/md/docker-search.md | 10 +- contrib/man/md/docker-start.md | 2 +- contrib/man/md/docker-stop.md | 2 +- contrib/man/md/docker-tag.md | 17 +-- contrib/man/md/docker-top.md | 3 +- contrib/man/md/docker-wait.md | 3 +- 30 files changed, 310 insertions(+), 272 deletions(-) diff --git a/contrib/man/md/README.md b/contrib/man/md/README.md index 601b30e033..12b3d171e3 100644 --- a/contrib/man/md/README.md +++ b/contrib/man/md/README.md @@ -1,8 +1,9 @@ Docker Documentation ==================== -This directory contains the docker user manual in Markdown format. -DO NOT edit the man pages in the man1 directory. Instead make changes here. +This directory contains the Docker user manual in the Markdown format. +Do *not* edit the man pages in the man1 directory. Instead, amend the +Markdown (*.md) files. # File List @@ -41,32 +42,34 @@ DO NOT edit the man pages in the man1 directory. Instead make changes here. Dockerfile md2man-all.sh -# Generating man pages from the Markdown +# Generating man pages from the Markdown files There are three ways to generate the man pages: -* Manually Individually -* Using the Script -* Using a the Pandoc Container (**Recommended**) +* Each page manually +* All pages manually +* Via a *Pandoc* Docker container (**Recommended**) -The first and second approach require you to install pandoc packages - on your host using the host operating systems package installer. Check -to see if pandoc is available if you choose that method. +The first and second approach require you to install the Pandoc package + on your computer using the default package installer for the system. +You should check if Pandoc is available before trying to do so. -The Pandoc container approach is recommneded because the conversion process -is isolated inside a fedora container and thereofre does not require you -find and install pandoc on your host. +The recommended approach is the Pandoc Docker container one. +Using the supplied Dockerfile, Docker creates a Fedora based container +and isolates the Pandoc installation. +This is a seamless process, saving you from dealing with Pandoc and +dependencies on your own computer. -## Manually Individually +## Each page manually -You can generate the manpage by: +You can generate the man pages with: pandoc -s -t man docker-.md ../man1/docker-.1 -The resulting man pages are stored in ../man1 +The results will be stored ../man1 -## Manually All +## All pages manually -Or regenerate all the manpages from this source using: +You can generate *all* the man pages from the source using: for FILE in *.md do @@ -77,14 +80,16 @@ Or regenerate all the manpages from this source using: There is a Dockerfile provided in the `docker/contrib/man/md` directory. -Use this Dockerfile to create a `fedora/pandoc` container: +Using this Dockerfile, create a Docker image tagged `fedora/pandoc`. - # docker build -t fedora/pandoc . + docker build -t fedora/pandoc . -After the container is created run the following command from your -`docker/contrib/man/md` directory: +Once the image is built, create a container inside the +`docker/contrib/man/md` directory using the it: - # docker run -v //docker/contrib/man:/pandoc:rw \ + docker run -v //docker/contrib/man:/pandoc:rw \ -w /pandoc -i fedora/pandoc /pandoc/md/md2man-all.sh -This will generate all man files into `docker/contrib/man/man1`. +The Pandoc Docker container will process the Markdown files and generate + the man pages inside the `docker/contrib/man/man1` directory using + Docker volumes. diff --git a/contrib/man/md/docker-attach.md b/contrib/man/md/docker-attach.md index 0365fbdeba..2755fd27f5 100644 --- a/contrib/man/md/docker-attach.md +++ b/contrib/man/md/docker-attach.md @@ -12,8 +12,8 @@ If you **docker run** a container in detached mode (**-d**), you can reattach to the detached container with **docker attach** using the container's ID or name. You can detach from the container again (and leave it running) with `CTRL-c` (for - a quiet exit) or `CTRL-\` to get a stacktrace of the Docker client when it quits -. When you detach from a container the exit code will be returned to +a quiet exit) or `CTRL-\` to get a stacktrace of the Docker client when it quits. +When you detach from a container the exit code will be returned to the client. # OPTIONS @@ -26,7 +26,7 @@ mode). The default is *true*. # EXAMPLES -##Attaching to a container +## Attaching to a container In this example the top command is run inside a container, from an image called fedora, in detached mode. The ID from the container is passed into the **docker @@ -53,4 +53,5 @@ attach** command: 1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-build.md b/contrib/man/md/docker-build.md index c9455f0e42..255c671951 100644 --- a/contrib/man/md/docker-build.md +++ b/contrib/man/md/docker-build.md @@ -9,64 +9,75 @@ docker-build - Build a container image from a Dockerfile source at PATH [**-rm**] [**-t**|**--tag**=*tag*] PATH | URL | - # DESCRIPTION -This will read the Dockerfile from the directory specified in **PATH**. It also - sends any other files and directories found in the current directory to the -Docker daemon. The contents of this directory would be used by **ADD** commands -found within the Dockerfile. Warning, this will send a lot of data to the Docker -daemon if the current directory contains a lot of data. +This will read the Dockerfile from the directory specified in **PATH**. +It also sends any other files and directories found in the current +directory to the Docker daemon. The contents of this directory would +be used by **ADD** commands found within the Dockerfile. -If the absolute path is provided instead of ‘.’, only the files and directories -required by the **ADD** command from the Dockerfile will be added to the context - and transferred to the Docker daemon. +Warning, this will send a lot of data to the Docker daemon depending +on the contents of the current directory. -When a single Dockerfile is given as URL, then no context is set. When a Git -repository is set as **URL**, the repository is used as context. +If the absolute path is provided instead of ‘.’, only the files and +directories required by the **ADD** command from the Dockerfile will +be added to the context and transferred to the Docker daemon. + +When a single Dockerfile is given as the URL, then no context is set. +When a Git repository is set as the **URL**, the repository is used +as context. # OPTIONS **-q**, **--quiet**=*true*|*false* -: When set to true, suppress verbose build output. Default is *false*. + When set to true, suppress verbose build output. Default is *false*. **--rm**=*true*|*false* -: When true, remove intermediate containers that are created during the build process. The default is true. + When true, remove intermediate containers that are created during the +build process. The default is true. **-t**, **--tag**=*tag* -: Tag to be applied to the resulting image on successful completion of the build. + Tag to be applied to the resulting image on successful completion of +the build. **--no-cache**=*true*|*false* -: When set to true, do not use a cache when building the image. The default is *false*. + When set to true, do not use a cache when building the image. The +default is *false*. # EXAMPLES -## Building an image from current directory +## Building an image using a Dockefile located inside the current directory -Using a Dockerfile, Docker images are built using the build command: +Docker images can be built using the build command and a Dockerfile: docker build . -If, for some reason, you do not what to remove the intermediate containers created during the build you must set --rm=false: +During the build process Docker creates intermediate images. In order to +remove them, you must explicitly set `--rm=false`. docker build --rm=false . -A good practice is to make a sub-directory with a related name and create the -Dockerfile in that directory. E.g. a directory called mongo may contain a -Dockerfile for a MongoDB image, or a directory called httpd may contain a -Dockerfile for an Apache web server. +A good practice is to make a sub-directory with a related name and create +the Dockerfile in that directory. For example, a directory called mongo may +contain a Dockerfile to create a Docker MongoDB image. Likewise, another +directory called httpd may be used to store Dockerfiles for Apache web +server images. -It is also good practice to add the files required for the image to the -sub-directory. These files will be then specified with the `ADD` instruction in -the Dockerfile. Note: if you include a tar file, which is good practice, then -Docker will automatically extract the contents of the tar file specified in the -`ADD` instruction into the specified target. +It is also a good practice to add the files required for the image to the +sub-directory. These files will then be specified with the `ADD` instruction +in the Dockerfile. Note: If you include a tar file (a good practice!), then +Docker will automatically extract the contents of the tar file +specified within the `ADD` instruction into the specified target. ## Building an image using a URL -This will clone the Github repository and use it as context. The Dockerfile at the root of the repository is used as Dockerfile. This only works if the Github repository is a dedicated repository. +This will clone the specified Github repository from the URL and use it +as context. The Dockerfile at the root of the repository is used as +Dockerfile. This only works if the Github repository is a dedicated +repository. docker build github.com/scollier/Fedora-Dockerfiles/tree/master/apache -Note that you can specify an arbitrary Git repository by using the `git://` -schema. +Note: You can set an arbitrary Git repository via the `git://` schema. # HISTORY -March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.io source material and internal work. +March 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-commit.md b/contrib/man/md/docker-commit.md index c1a70d3f59..8bc496eb76 100644 --- a/contrib/man/md/docker-commit.md +++ b/contrib/man/md/docker-commit.md @@ -3,11 +3,11 @@ % APRIL 2014 # NAME docker-commit - Create a new image from the changes to an existing - container +container # SYNOPSIS -**docker commit** **-a**|**--author**[=""] **-m**|**--message**[=""] CONTAINER - [REPOSITORY[:TAG]] +**docker commit** **-a**|**--author**[=""] **-m**|**--message**[=""] +CONTAINER [REPOSITORY[:TAG]] # DESCRIPTION Using an existing container's name or ID you can create a new image. @@ -24,7 +24,7 @@ Using an existing container's name or ID you can create a new image. ## Creating a new image from an existing container And existing Fedora based container has had Apache installed while running in interactive mode with the bash shell. Apache is also running. To - create a new image run docker ps to find the container's ID and then run: +create a new image run docker ps to find the container's ID and then run: # docker commit -me= "Added Apache to Fedora base image" \ --a="A D Ministrator" 98bd7fc99854 fedora/fedora_httpd:20 diff --git a/contrib/man/md/docker-cp.md b/contrib/man/md/docker-cp.md index 9043b776b4..05c88b1228 100644 --- a/contrib/man/md/docker-cp.md +++ b/contrib/man/md/docker-cp.md @@ -20,4 +20,5 @@ the exited container to the current dir on the host: # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + diff --git a/contrib/man/md/docker-diff.md b/contrib/man/md/docker-diff.md index 9b0c76c9d5..2053f2c3d2 100644 --- a/contrib/man/md/docker-diff.md +++ b/contrib/man/md/docker-diff.md @@ -39,4 +39,6 @@ Inspect the changes to on a nginx container: # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + + diff --git a/contrib/man/md/docker-events.md b/contrib/man/md/docker-events.md index 61e0e5c0ad..c9bfdec9e8 100644 --- a/contrib/man/md/docker-events.md +++ b/contrib/man/md/docker-events.md @@ -19,8 +19,8 @@ seconds since epoch, or date string. ## Listening for Docker events -After running docker events a container 786d698004576 is started and stopped: -(The container name has been shortened in the ouput below) +After running docker events a container 786d698004576 is started and stopped +(The container name has been shortened in the ouput below): # docker events [2014-04-12 18:23:04 -0400 EDT] 786d69800457: (from whenry/testimage:latest) start @@ -43,4 +43,4 @@ Again the output container IDs have been shortened for the purposes of this docu # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. \ No newline at end of file +based on docker.io source material and internal work. \ No newline at end of file diff --git a/contrib/man/md/docker-history.md b/contrib/man/md/docker-history.md index 54b75ea22b..1b3a9858b5 100644 --- a/contrib/man/md/docker-history.md +++ b/contrib/man/md/docker-history.md @@ -29,4 +29,4 @@ Show the history of when and how an image was created. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-images.md b/contrib/man/md/docker-images.md index 7d2bf5c719..a466798096 100644 --- a/contrib/man/md/docker-images.md +++ b/contrib/man/md/docker-images.md @@ -20,11 +20,11 @@ By default, intermediate images, used during builds, are not listed. Some of the output, e.g. image ID, is truncated, for space reasons. However the truncated image ID, and often the first few characters, are enough to be used in other Docker commands that use the image ID. The output includes repository, tag, image - ID, date created and the virtual size. +ID, date created and the virtual size. The title REPOSITORY for the first title may seem confusing. It is essentially the image name. However, because you can tag a specific image, and multiple tags - (image instances) can be associated with a single name, the name is really a +(image instances) can be associated with a single name, the name is really a repository for all tagged images of the same name. For example consider an image called fedora. It may be tagged with 18, 19, or 20, etc. to manage different versions. @@ -32,22 +32,24 @@ versions. # OPTIONS **-a**, **--all**=*true*|*false* -: When set to true, also include all intermediate images in the list. The + When set to true, also include all intermediate images in the list. The default is false. **--no-trunc**=*true*|*false* -: When set to true, list the full image ID and not the truncated ID. The default is false. + When set to true, list the full image ID and not the truncated ID. The +default is false. **-q**, **--quiet**=*true*|*false* -: When set to true, list the complete image ID as part of the output. The + When set to true, list the complete image ID as part of the output. The default is false. **-t**, **--tree**=*true*|*false* -: When set to true, list the images in a tree dependency tree (hierarchy) format -. The default is false. + When set to true, list the images in a tree dependency tree (hierarchy) +format. The default is false. **-v**, **--viz**=*true*|*false* -: When set to true, list the graph in graphviz format. The default is *false*. + When set to true, list the graph in graphviz format. The default is +*false*. # EXAMPLES @@ -61,7 +63,8 @@ The list will contain the image repository name, a tag for the image, and an image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG, IMAGE ID, CREATED, and VIRTUAL SIZE. -To get a verbose list of images which contains all the intermediate images used in builds use **-a**: +To get a verbose list of images which contains all the intermediate images +used in builds use **-a**: docker images -a @@ -72,21 +75,25 @@ tree format, use the **-t** option. docker images -t -This displays a staggered hierarchy tree where the less indented image is the oldest with dependent image layers branching inward (to the right) on subsequent lines. The newest or top level image layer is listed last in any tree branch. +This displays a staggered hierarchy tree where the less indented image is +the oldest with dependent image layers branching inward (to the right) on +subsequent lines. The newest or top level image layer is listed last in +any tree branch. ## List images in GraphViz format -To display the list in a format consumable by a GraphViz tools run with **-v**. -For example to produce a .png graph file of the hierarchy use: +To display the list in a format consumable by a GraphViz tools run with +**-v**. For example to produce a .png graph file of the hierarchy use: docker images --viz | dot -Tpng -o docker.png ## Listing only the shortened image IDs -Listing just the shortened image IDs. This can be useful for some automated tools. +Listing just the shortened image IDs. This can be useful for some automated +tools. docker images -q # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based - on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-import.md b/contrib/man/md/docker-import.md index 145e6d3780..a0db89eef4 100644 --- a/contrib/man/md/docker-import.md +++ b/contrib/man/md/docker-import.md @@ -2,15 +2,15 @@ % William Henry % APRIL 2014 # NAME -docker-import - Create an empty filesystem image and import the contents of - the tarball into it. +docker-import - Create an empty filesystem image and import the contents +of the tarball into it. # SYNOPSIS **docker import** URL|- [REPOSITORY[:TAG]] # DESCRIPTION -Create a new filesystem image from the contents of a tarball (.tar, .tar.gz, - .tgz, .bzip, .tar.xz, .txz) into it, then optionally tag it. +Create a new filesystem image from the contents of a tarball (.tar, +.tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then optionally tag it. # EXAMPLES @@ -36,4 +36,4 @@ Import to docker via pipe and stdin: # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-info.md b/contrib/man/md/docker-info.md index 55ab212bb8..8c03945dbe 100644 --- a/contrib/man/md/docker-info.md +++ b/contrib/man/md/docker-info.md @@ -10,8 +10,8 @@ docker-info - Display system wide information # DESCRIPTION This command displays system wide information regarding the Docker installation. Information displayed includes the number of containers and images, pool name, -data file, metadata file, data space used, total data space, metadata space used, - total metadata space, execution driver, and the kernel version. +data file, metadata file, data space used, total data space, metadata space used +, total metadata space, execution driver, and the kernel version. The data file is where the images are stored and the metadata file is where the meta data regarding those images are stored. When run for the first time Docker @@ -42,4 +42,5 @@ Here is a sample output: Kernel Version: 3.10.0-116.el7.x86_64 # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-inspect.md b/contrib/man/md/docker-inspect.md index 86dcd17fd3..a49e42138f 100644 --- a/contrib/man/md/docker-inspect.md +++ b/contrib/man/md/docker-inspect.md @@ -17,7 +17,7 @@ each result. # OPTIONS **-f**, **--format**="" -: The text/template package of Go describes all the details of the + The text/template package of Go describes all the details of the format. See examples section # EXAMPLES @@ -28,11 +28,11 @@ To get information on a container use it's ID or instance name: #docker inspect 1eb5fabf5a03 [{ - "ID": "1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b", - "Created": "2014-04-04T21:33:52.02361335Z", - "Path": "/usr/sbin/nginx", - "Args": [], - "Config": { + "ID": "1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b", + "Created": "2014-04-04T21:33:52.02361335Z", + "Path": "/usr/sbin/nginx", + "Args": [], + "Config": { "Hostname": "1eb5fabf5a03", "Domainname": "", "User": "", @@ -50,8 +50,8 @@ To get information on a container use it's ID or instance name: "OpenStdin": false, "StdinOnce": false, "Env": [ - "HOME=/", - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/usr/sbin/nginx" @@ -66,8 +66,8 @@ To get information on a container use it's ID or instance name: "NetworkDisabled": false, "OnBuild": null, "Context": { - "mount_label": "system_u:object_r:svirt_sandbox_file_t:s0:c0,c650", - "process_label": "system_u:system_r:svirt_lxc_net_t:s0:c0,c650" + "mount_label": "system_u:object_r:svirt_sandbox_file_t:s0:c0,c650", + "process_label": "system_u:system_r:svirt_lxc_net_t:s0:c0,c650" } }, "State": { @@ -135,7 +135,8 @@ To get the IP address of a container use: One can loop over arrays and maps in the results to produce simple text output: - # docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' 1eb5fabf5a03 + # docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} \ + {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' 1eb5fabf5a03 80/tcp -> 80 @@ -224,5 +225,5 @@ Use an image's ID or name (e.g. repository/name[:tag]) to get information # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot -com) based on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-load.md b/contrib/man/md/docker-load.md index 4438858070..535b701cca 100644 --- a/contrib/man/md/docker-load.md +++ b/contrib/man/md/docker-load.md @@ -10,7 +10,7 @@ docker-load - Load an image from a tar archive on STDIN # DESCRIPTION Loads a tarred repository from a file or the standard input stream. - Restores both images and tags. +Restores both images and tags. # OPTIONS @@ -33,4 +33,4 @@ Loads a tarred repository from a file or the standard input stream. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-login.md b/contrib/man/md/docker-login.md index 635d1bd996..0a9cb283dd 100644 --- a/contrib/man/md/docker-login.md +++ b/contrib/man/md/docker-login.md @@ -10,9 +10,8 @@ docker-login - Register or Login to a docker registry server. # DESCRIPTION Register or Login to a docker registry server, if no server is - specified "https://index.docker.io/v1/" is the default. If you want to - login to a private registry you can specify this by adding the server - name. +specified "https://index.docker.io/v1/" is the default. If you want to +login to a private registry you can specify this by adding the server name. # OPTIONS **-e**, **--email**="" @@ -30,7 +29,7 @@ Register or Login to a docker registry server, if no server is # docker login localhost:8080 - # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + diff --git a/contrib/man/md/docker-logs.md b/contrib/man/md/docker-logs.md index ad9b13540c..ef5e464730 100644 --- a/contrib/man/md/docker-logs.md +++ b/contrib/man/md/docker-logs.md @@ -9,12 +9,12 @@ docker-logs - Fetch the logs of a container # DESCRIPTION The **docker logs** command batch-retrieves whatever logs are present for - a container at the time of execution. This does not guarantee execution +a container at the time of execution. This does not guarantee execution order when combined with a docker run (i.e. your run may not have generated - any logs at the time you execute docker logs). +any logs at the time you execute docker logs). The **docker logs --follow** command combines commands **docker logs** and - **docker attach**. It will first return all logs from the beginning and +**docker attach**. It will first return all logs from the beginning and then continue streaming new output from the container’s stdout and stderr. # OPTIONS @@ -23,4 +23,4 @@ then continue streaming new output from the container’s stdout and stderr. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-port.md b/contrib/man/md/docker-port.md index 8b604c0912..9773e4d80c 100644 --- a/contrib/man/md/docker-port.md +++ b/contrib/man/md/docker-port.md @@ -12,4 +12,4 @@ Lookup the public-facing port which is NAT-ed to PRIVATE_PORT # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-ps.md b/contrib/man/md/docker-ps.md index 2662a02139..60fce0213a 100644 --- a/contrib/man/md/docker-ps.md +++ b/contrib/man/md/docker-ps.md @@ -19,19 +19,19 @@ the running containers. **-a**, **--all**=*true*|*false* When true show all containers. Only running containers are shown by - default. Default is false. +default. Default is false. **--before**="" Show only container created before Id or Name, include non-running - ones. +ones. **-l**, **--latest**=*true*|*false* When true show only the latest created container, include non-running - ones. The default is false. +ones. The default is false. **-n**=NUM Show NUM (integer) last created containers, include non-running ones. - The default is -1 (none) +The default is -1 (none) **--no-trunc**=*true*|*false* When true truncate output. Default is false. @@ -65,4 +65,4 @@ the running containers. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-pull.md b/contrib/man/md/docker-pull.md index 8d9ad0e3ab..1f64d3f648 100644 --- a/contrib/man/md/docker-pull.md +++ b/contrib/man/md/docker-pull.md @@ -33,4 +33,5 @@ images for that repository name are pulled down including any tags. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + diff --git a/contrib/man/md/docker-push.md b/contrib/man/md/docker-push.md index 4c887d399e..e6f1f51ad6 100644 --- a/contrib/man/md/docker-push.md +++ b/contrib/man/md/docker-push.md @@ -9,7 +9,7 @@ docker-push - Push an image or a repository to the registry # DESCRIPTION Push and image or repository to a registry. The registry may the default - [index.docker.io](https://index.docker.io/v1/) or a another registry +[index.docker.io](https://index.docker.io/v1/) or a another registry # EXAMPLE @@ -22,9 +22,9 @@ and then committing it to a new image name: Now push the image to the registry using the image ID. In this example the registry is on host named registry-host and listening on port 5000. - Default Docker commands will push to the default `index.docker.io` - registry. Instead, push to the local registry, which is on a host called - registry-host*. To do this, tag the image with the host name or IP +Default Docker commands will push to the default `index.docker.io` +registry. Instead, push to the local registry, which is on a host called +registry-host*. To do this, tag the image with the host name or IP address, and the port of the registry: # docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd @@ -35,8 +35,8 @@ Check that this worked by running: # docker images You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd` - listed. +listed. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-restart.md b/contrib/man/md/docker-restart.md index d60988c761..44634f6613 100644 --- a/contrib/man/md/docker-restart.md +++ b/contrib/man/md/docker-restart.md @@ -13,8 +13,9 @@ Restart each container listed. # OPTIONS **-t**, **--time**=NUM Number of seconds to try to stop for before killing the container. Once - killed it will then be restarted. Default=10 +killed it will then be restarted. Default=10 # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + diff --git a/contrib/man/md/docker-rm.md b/contrib/man/md/docker-rm.md index f569ed8bfa..ae85af5277 100644 --- a/contrib/man/md/docker-rm.md +++ b/contrib/man/md/docker-rm.md @@ -22,15 +22,15 @@ containers on a host use the **docker ps -a** command. # OPTIONS **-f**, **--force**=*true*|*false* -: When set to true, force the removal of the container. The default is + When set to true, force the removal of the container. The default is *false*. **-l**, **--link**=*true*|*false* -: When set to true, remove the specified link and not the underlying + When set to true, remove the specified link and not the underlying container. The default is *false*. **-v**, **--volumes**=*true*|*false* -: When set to true, remove the volumes associated to the container. The + When set to true, remove the volumes associated to the container. The default is *false*. # EXAMPLES @@ -39,7 +39,7 @@ default is *false*. To remove a container using its ID, find either from a **docker ps -a** command, or use the ID returned from the **docker run** command, or retrieve - it from a file used to store it using the **docker run --cidfile**: +it from a file used to store it using the **docker run --cidfile**: docker rm abebf7571666 @@ -52,5 +52,5 @@ command. The use that name as follows: # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based - on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-rmi.md b/contrib/man/md/docker-rmi.md index ef5ede6f87..b728dc16a9 100644 --- a/contrib/man/md/docker-rmi.md +++ b/contrib/man/md/docker-rmi.md @@ -13,12 +13,12 @@ docker-rmi \- Remove one or more images. This will remove one or more images from the host node. This does not remove images from a registry. You cannot remove an image of a running container unless you use the **-f** option. To see all images on a host - use the **docker images** command. +use the **docker images** command. # OPTIONS **-f**, **--force**=*true*|*false* -: When set to true, force the removal of the image. The default is + When set to true, force the removal of the image. The default is *false*. # EXAMPLES @@ -31,5 +31,5 @@ Here is an example of removing and image: # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based - on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-run.md b/contrib/man/md/docker-run.md index a79706c430..56364f9d5f 100644 --- a/contrib/man/md/docker-run.md +++ b/contrib/man/md/docker-run.md @@ -38,112 +38,114 @@ pull** IMAGE, before it starts the container from that image. # OPTIONS -**-a**, **--attach**=*stdin*|*stdout*|*stderr*: -Attach to stdin, stdout or stderr. In foreground mode (the default when **-d** is - not specified), **docker run** can start the process in the container and attach - the console to the process’s standard input, output, and standard error. It can -even pretend to be a TTY (this is what most commandline executables expect) and -pass along signals. The **-a** option can be set for each of stdin, stdout, and -stderr. +**-a**, **--attach**=*stdin*|*stdout*|*stderr* + Attach to stdin, stdout or stderr. In foreground mode (the default when +**-d** is not specified), **docker run** can start the process in the container +and attach the console to the process’s standard input, output, and standard +error. It can even pretend to be a TTY (this is what most commandline +executables expect) and pass along signals. The **-a** option can be set for +each of stdin, stdout, and stderr. -**-c**, **--cpu-shares**=0: -CPU shares in relative weight. You can increase the priority of a container with -the -c option. By default, all containers run at the same priority and get 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 run**. +**-c**, **--cpu-shares**=0 + CPU shares in relative weight. You can increase the priority of a container +with the -c option. By default, all containers run at the same priority and get +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 +run**. -**--cidfile**=*file*: -Write the container ID to the file specified. +**--cidfile**=*file* + Write the container ID to the file specified. -**-d**, **-detach**=*true*|*false*: -Detached mode. This runs the container in the background. It outputs the new +**-d**, **-detach**=*true*|*false* + Detached mode. This runs the container in the background. It outputs the new container's ID and any error messages. At any time you can run **docker ps** in the other shell to view a list of the running containers. You can reattach to a detached container with **docker attach**. If you choose to run a container in the detached mode, then you cannot use the **-rm** option. -**--dns**=*IP-address*: -Set custom DNS servers. This option can be used to override the DNS configuration - passed to the container. Typically this is necessary when the host DNS -configuration is invalid for the container (eg. 127.0.0.1). When this is the case - the **-dns** flags is necessary for every run. +**--dns**=*IP-address* + Set custom DNS servers. This option can be used to override the DNS +configuration passed to the container. Typically this is necessary when the +host DNS configuration is invalid for the container (eg. 127.0.0.1). When this +is the case the **-dns** flags is necessary for every run. -**-e**, **-env**=*environment*: -Set environment variables. This option allows you to specify arbitrary +**-e**, **-env**=*environment* + Set environment variables. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container. -**--entrypoint**=*command*: -This option allows you to overwrite the default entrypoint of the image that is -set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND because - it specifies what executable to run when the container starts, but it is +**--entrypoint**=*command* + This option allows you to overwrite the default entrypoint of the image that +is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND +because it specifies what executable to run when the container starts, but it is (purposely) more difficult to override. The ENTRYPOINT gives a container its default nature or behavior, so that when you set an ENTRYPOINT you can run the container as if it were that binary, complete with default options, and you can pass in more options via the COMMAND. But, sometimes an operator may want to run 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 ENTRYPOINT -. +at runtime by using a **--entrypoint** and a string to specify the new +ENTRYPOINT. -**--expose**=*port*: -Expose a port from the container without publishing it to your host. A containers - port can be exposed to other containers in three ways: 1) The developer can -expose the port using the EXPOSE parameter of the Dockerfile, 2) the operator can - use the **--expose** option with **docker run**, or 3) the container can be -started with the **--link**. +**--expose**=*port* + Expose a port from the container without publishing it to your host. A +containers port can be exposed to other containers in three ways: 1) The +developer can expose the port using the EXPOSE parameter of the Dockerfile, 2) +the operator can use the **--expose** option with **docker run**, or 3) the +container can be started with the **--link**. -**-m**, **-memory**=*memory-limit*: -Allows you to constrain the memory available to a container. If the host supports - swap memory, then the -m memory setting can be larger than physical RAM. The -memory limit format: , where unit = b, k, m or g. +**-m**, **-memory**=*memory-limit* + Allows you to constrain the memory available to a container. If the host +supports swap memory, then the -m memory setting can be larger than physical +RAM. The memory limit format: , where unit = b, k, m or +g. -**-P**, **-publish-all**=*true*|*false*: -When set to true publish all exposed ports to the host interfaces. The default is - false. If the operator uses -P (or -p) then Docker will make the exposed port -accessible on the host and the ports will be available to any client that can -reach the host. To find the map between the host ports and the exposed ports, use - **docker port**. +**-P**, **-publish-all**=*true*|*false* + When set to true publish all exposed ports to the host interfaces. The +default is false. If the operator uses -P (or -p) then Docker will make the +exposed port accessible on the host and the ports will be available to any +client that can reach the host. To find the map between the host ports and the +exposed ports, use **docker port**. -**-p**, **-publish**=[]: -Publish a container's port to the host (format: ip:hostPort:containerPort | +**-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) -**-h**, **-hostname**=*hostname*: -Sets the container host name that is available inside the container. +**-h**, **-hostname**=*hostname* + Sets the container host name that is available inside the container. -**-i**, **-interactive**=*true*|*false*: -When set to true, keep stdin open even if not attached. The default is false. +**-i**, **-interactive**=*true*|*false* + When set to true, keep stdin open even if not attached. The default is false. -**--link**=*name*:*alias*: -Add link to another container. The format is name:alias. If the operator uses -**--link** when starting the new client container, then the client container can -access the exposed port via a private networking interface. Docker will set some -environment variables in the client container to help indicate which interface -and port to use. +**--link**=*name*:*alias* + Add link to another container. The format is name:alias. If the operator +uses **--link** when starting the new client container, then the client +container can access the exposed port via a private networking interface. Docker +will set some environment variables in the client container to help indicate +which interface and port to use. -**-n**, **-networking**=*true*|*false*: -By default, all containers have networking enabled (true) and can make outgoing -connections. The operator can disable networking with **--networking** to false. - This disables all incoming and outgoing networking. In cases like this, I/O can -only be performed through files or by using STDIN/STDOUT. +**-n**, **-networking**=*true*|*false* + By default, all containers have networking enabled (true) and can make +outgoing connections. The operator can disable networking with **--networking** +to false. This disables all incoming and outgoing networking. In cases like this +, I/O can only be performed through files or by using STDIN/STDOUT. Also by default, the container will use the same DNS servers as the host. The operator may override this with **-dns**. -**--name**=*name*: -Assign a name to the container. The operator can identify a container in three -ways: +**--name**=*name* + Assign a name to the container. The operator can identify a container in +three ways: UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) UUID short identifier (“f78375b1c487”) @@ -152,73 +154,73 @@ ways: The UUID identifiers come from the Docker daemon, and if a name is not assigned to the container with **--name** then the daemon will also generate a random string name. The name is useful when defining links (see **--link**) (or any -other place you need to identify a container). This works for both background and - foreground Docker containers. +other place you need to identify a container). This works for both background +and foreground Docker containers. -**--privileged**=*true*|*false*: -Give extended privileges to this container. By default, Docker containers are +**--privileged**=*true*|*false* + Give extended privileges to this container. By default, Docker containers are “unprivileged” (=false) and cannot, for example, run a Docker daemon inside the -Docker container. This is because by default a container is not allowed to access - any devices. A “privileged” container is given access to all devices. +Docker container. This is because by default a container is not allowed to +access any devices. A “privileged” container is given access to all devices. When the operator executes **docker run -privileged**, Docker will enable access -to all devices on the host as well as set some configuration in AppArmor to allow - the container nearly all the same access to the host as processes running +to all devices on the host as well as set some configuration in AppArmor to +allow the container nearly all the same access to the host as processes running outside of a container on the host. -**--rm**=*true*|*false*: -If set to *true* the container is automatically removed when it exits. The +**--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**. -**--sig-proxy**=*true*|*false*: -When set to true, proxify all received signals to the process (even in non-tty -mode). The default is true. +**--sig-proxy**=*true*|*false* + When set to true, proxify all received signals to the process (even in +non-tty mode). The default is true. -**-t**, **-tty**=*true*|*false*: -When set to true Docker can allocate a pseudo-tty and attach to the standard +**-t**, **-tty**=*true*|*false* + 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 interactive shell. The default is value is false. -**-u**, **-user**=*username*,*uid*: -Set a username or UID for the container. +**-u**, **-user**=*username*,*uid* + Set a username or UID for the container. -**-v**, **-volume**=*volume*: -Bind mount a volume to the container. The **-v** option can be used one or more -times to add one or more mounts to a container. These mounts can then be used in -other containers using the **--volumes-from** option. See examples. +**-v**, **-volume**=*volume* + Bind mount a volume to the container. The **-v** option can be used one or +more times to add one or more mounts to a container. These mounts can then be +used in other containers using the **--volumes-from** option. See examples. -**--volumes-from**=*container-id*: -Will mount volumes from the specified container identified by container-id. Once -a volume is mounted in a one container it can be shared with other containers -using the **--volumes-from** option when running those other containers. The -volumes can be shared even if the original container with the mount is not -running. +**--volumes-from**=*container-id* + Will mount volumes from the specified container identified by container-id. +Once a volume is mounted in a one container it can be shared with other +containers using the **--volumes-from** option when running those other +containers. The volumes can be shared even if the original container with the +mount is not running. -**-w**, **-workdir**=*directory*: -Working directory inside the container. The default working directory for running - binaries within a container is the root directory (/). The developer can set a -different default with the Dockerfile WORKDIR instruction. The operator can -override the working directory by using the **-w** option. +**-w**, **-workdir**=*directory* + Working directory inside the container. The default working directory for +running binaries within a container is the root directory (/). The developer can +set a different default with the Dockerfile WORKDIR instruction. The operator +can override the working directory by using the **-w** option. -**IMAGE**: -The image name or ID. +**IMAGE** + The image name or ID. -**COMMAND**: -The command or program to run inside the image. +**COMMAND** + The command or program to run inside the image. -**ARG**: -The arguments for the command to be run in the container. +**ARG** + The arguments for the command to be run in the container. # EXAMPLES @@ -252,12 +254,13 @@ you’d like to connect instead, as in: ## Linking Containers The link feature allows multiple containers to communicate with each other. For -example, a container whose Dockerfile has exposed port 80 can be run and named as - follows: +example, a container whose Dockerfile has exposed port 80 can be run and named +as follows: # docker run --name=link-test -d -i -t fedora/httpd -A second container, in this case called linker, can communicate with the httpd container, named link-test, by running with the **--link=:** +A second container, in this case called linker, can communicate with the httpd +container, named link-test, by running with the **--link=:** # docker run -t -i --link=link-test:lt --name=linker fedora /bin/bash @@ -280,15 +283,15 @@ Running the **env** command in the linker container shows environment variables LT_PORT_80_TCP_ADDR=172.17.0.3 _=/usr/bin/env -When linking two containers Docker will use the exposed ports of the container to - create a secure tunnel for the parent to access. +When linking two containers Docker will use the exposed ports of the container +to create a secure tunnel for the parent to access. ## Mapping Ports for External Usage The exposed port of an application can be mapped to a host port using the **-p** - flag. For example a httpd port 80 can be mapped to the host port 8080 using the - following: +flag. For example a httpd port 80 can be mapped to the host port 8080 using the +following: # docker run -p 8080:80 -d -i -t fedora/httpd @@ -313,8 +316,9 @@ container, allowing to abstract the actual data source from users of that data: ## Mounting External Volumes -To mount a host directory as a container volume, specify the absolute path to the - directory and the absolute path for the container directory separated by a colon: +To mount a host directory as a container volume, specify the absolute path to +the directory and the absolute path for the container directory separated by a +colon: # docker run -v /var/db:/data1 -i -t fedora bash @@ -335,5 +339,5 @@ Now, writing to the /data1 volume in the container will be allowed and the changes will also be reflected on the host in /var/db. # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based - on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-save.md b/contrib/man/md/docker-save.md index 1bf60bcbac..126af6b154 100644 --- a/contrib/man/md/docker-save.md +++ b/contrib/man/md/docker-save.md @@ -20,7 +20,7 @@ Stream to a file instead of STDOUT by using **-o**. # EXAMPLE Save all fedora repository images to a fedora-all.tar and save the latest - fedora image to a fedora-latest.tar: +fedora image to a fedora-latest.tar: $ sudo docker save fedora > fedora-all.tar $ sudo docker save --output=fedora-latest.tar fedora:latest @@ -31,4 +31,5 @@ Save all fedora repository images to a fedora-all.tar and save the latest # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + diff --git a/contrib/man/md/docker-search.md b/contrib/man/md/docker-search.md index 875ceefd46..fb2c921f8a 100644 --- a/contrib/man/md/docker-search.md +++ b/contrib/man/md/docker-search.md @@ -12,18 +12,18 @@ docker-search - Search the docker index for images Search an index for an image with that matches the term TERM. The table of images returned displays the name, description (truncated by default), - number of stars awarded, whether the image is official, and -whether it is trusted. +number of stars awarded, whether the image is official, and whether it +is trusted. # OPTIONS -**--no-trunc**=*true*|*false*: +**--no-trunc**=*true*|*false* When true display the complete description. The default is false. **-s**, **--stars**=NUM Only displays with at least NUM (integer) stars. I.e. only those images ranked >=NUM. -**-t**, **--trusted**=*true*|*false*: +**-t**, **--trusted**=*true*|*false* When true only show trusted builds. The default is false. # EXAMPLE @@ -52,4 +52,4 @@ ranked 1 or higher: # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-start.md b/contrib/man/md/docker-start.md index 02b8a8a976..9e639bbb5e 100644 --- a/contrib/man/md/docker-start.md +++ b/contrib/man/md/docker-start.md @@ -22,4 +22,4 @@ the process # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-stop.md b/contrib/man/md/docker-stop.md index 2a7403aed3..6ec81cd472 100644 --- a/contrib/man/md/docker-stop.md +++ b/contrib/man/md/docker-stop.md @@ -19,4 +19,4 @@ The default is 10 seconds. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-tag.md b/contrib/man/md/docker-tag.md index a3493051f9..49f5a6c4d1 100644 --- a/contrib/man/md/docker-tag.md +++ b/contrib/man/md/docker-tag.md @@ -12,21 +12,22 @@ IMAGE [REGISTRYHOST/][USERNAME/]NAME[:TAG] This will tag an image in the repository. # "OPTIONS" -**-f**, **--force**=*true*|*false*: -When set to true, force the tag name. The default is *false*. +**-f**, **--force**=*true*|*false* + When set to true, force the tag name. The default is *false*. **REGISTRYHOST** -: The hostname of the registry if required. This may also include the port + The hostname of the registry if required. This may also include the port separated by a ':' **USERNAME** -: The username or other qualifying identifier for the image. + The username or other qualifying identifier for the image. **NAME** -: The image name. + The image name. **TAG** -: The tag you are assigning to the image. + The tag you are assigning to the image. + # EXAMPLES ## Tagging an image @@ -43,5 +44,5 @@ registry you must tag it with the registry hostname and port (if needed). docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0 # HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) based - on docker.io source material and internal work. +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.io source material and internal work. diff --git a/contrib/man/md/docker-top.md b/contrib/man/md/docker-top.md index d2b2b88d24..2c00c527a5 100644 --- a/contrib/man/md/docker-top.md +++ b/contrib/man/md/docker-top.md @@ -23,4 +23,5 @@ Run **docker top** with the ps option of -x: # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + diff --git a/contrib/man/md/docker-wait.md b/contrib/man/md/docker-wait.md index 165b9e812b..6754151f09 100644 --- a/contrib/man/md/docker-wait.md +++ b/contrib/man/md/docker-wait.md @@ -19,4 +19,5 @@ Block until a container stops, then print its exit code. # HISTORY April 2014, Originally compiled by William Henry (whenry at redhat dot com) - based on docker.io source material and internal work. +based on docker.io source material and internal work. + From 95c311c8b4c63d81792c8683da677b790edf4000 Mon Sep 17 00:00:00 2001 From: William Henry Date: Thu, 17 Apr 2014 13:36:22 -0600 Subject: [PATCH 5/9] Made some edits and removed the alternative, manual generation instructions. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) Changes to be committed: modified: contrib/man/md/README.md --- contrib/man/md/README.md | 46 +++++++++------------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/contrib/man/md/README.md b/contrib/man/md/README.md index 12b3d171e3..c6417d2470 100644 --- a/contrib/man/md/README.md +++ b/contrib/man/md/README.md @@ -44,52 +44,26 @@ Markdown (*.md) files. # Generating man pages from the Markdown files -There are three ways to generate the man pages: -* Each page manually -* All pages manually -* Via a *Pandoc* Docker container (**Recommended**) - -The first and second approach require you to install the Pandoc package - on your computer using the default package installer for the system. -You should check if Pandoc is available before trying to do so. - -The recommended approach is the Pandoc Docker container one. -Using the supplied Dockerfile, Docker creates a Fedora based container -and isolates the Pandoc installation. -This is a seamless process, saving you from dealing with Pandoc and -dependencies on your own computer. - -## Each page manually - -You can generate the man pages with: - - pandoc -s -t man docker-.md ../man1/docker-.1 - -The results will be stored ../man1 - -## All pages manually - -You can generate *all* the man pages from the source using: - - for FILE in *.md - do - pandoc -s -t man $FILE -o ../man1/"${FILE%.*}".1 - done +The recommended approach for generating the man pages using a Docker container +one. Using the supplied Dockerfile, Docker creates a Fedora based container +and isolates the Pandoc installation. This is a seamless process, saving you +from dealing with Pandoc and dependencies on your own computer. ## Using the pandoc Container There is a Dockerfile provided in the `docker/contrib/man/md` directory. -Using this Dockerfile, create a Docker image tagged `fedora/pandoc`. +Using this Dockerfile, create a Docker image tagged `fedora/pandoc`: docker build -t fedora/pandoc . -Once the image is built, create a container inside the -`docker/contrib/man/md` directory using the it: +Once the image is built, run a container using it: docker run -v //docker/contrib/man:/pandoc:rw \ -w /pandoc -i fedora/pandoc /pandoc/md/md2man-all.sh The Pandoc Docker container will process the Markdown files and generate - the man pages inside the `docker/contrib/man/man1` directory using - Docker volumes. +the man pages inside the `docker/contrib/man/man1` directory using +Docker volumes. For more information on Docker volumes see the man page for +`docker run` and also look at the article [Shared Directories via Volumes] +(http://docs.docker.io/use/working_with_volumes/). From 7922e67870a393417c88c2d27f0e8fac47e4596e Mon Sep 17 00:00:00 2001 From: William Henry Date: Thu, 17 Apr 2014 13:52:13 -0600 Subject: [PATCH 6/9] Fixed a sentence for ostezer. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) modified: contrib/man/md/README.md --- contrib/man/md/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/man/md/README.md b/contrib/man/md/README.md index c6417d2470..46a076a929 100644 --- a/contrib/man/md/README.md +++ b/contrib/man/md/README.md @@ -57,7 +57,7 @@ Using this Dockerfile, create a Docker image tagged `fedora/pandoc`: docker build -t fedora/pandoc . -Once the image is built, run a container using it: +Once the image is built, run a container using the image with *volumes*: docker run -v //docker/contrib/man:/pandoc:rw \ -w /pandoc -i fedora/pandoc /pandoc/md/md2man-all.sh From bbde4298a5c8e12afb6a7bc81c3634b97c2a3c7d Mon Sep 17 00:00:00 2001 From: William Henry Date: Mon, 21 Apr 2014 11:55:06 -0600 Subject: [PATCH 7/9] Edits based on Sven's comments. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) Changes to be committed: modified: contrib/man/md/docker-build.md modified: contrib/man/md/docker-commit.md --- contrib/man/md/docker-build.md | 11 +- contrib/man/md/docker-commit.md | 2 +- contrib/man/old-man/docker-attach.1 | 56 ++++++ contrib/man/old-man/docker-build.1 | 65 +++++++ contrib/man/old-man/docker-images.1 | 84 ++++++++ contrib/man/old-man/docker-info.1 | 39 ++++ contrib/man/old-man/docker-inspect.1 | 237 +++++++++++++++++++++++ contrib/man/old-man/docker-rm.1 | 45 +++++ contrib/man/old-man/docker-rm.md | 50 +++++ contrib/man/old-man/docker-rmi.1 | 29 +++ contrib/man/old-man/docker-run.1 | 277 +++++++++++++++++++++++++++ contrib/man/old-man/docker-tag.1 | 49 +++++ contrib/man/old-man/docker.1 | 172 +++++++++++++++++ 13 files changed, 1109 insertions(+), 7 deletions(-) create mode 100644 contrib/man/old-man/docker-attach.1 create mode 100644 contrib/man/old-man/docker-build.1 create mode 100644 contrib/man/old-man/docker-images.1 create mode 100644 contrib/man/old-man/docker-info.1 create mode 100644 contrib/man/old-man/docker-inspect.1 create mode 100644 contrib/man/old-man/docker-rm.1 create mode 100644 contrib/man/old-man/docker-rm.md create mode 100644 contrib/man/old-man/docker-rmi.1 create mode 100644 contrib/man/old-man/docker-run.1 create mode 100644 contrib/man/old-man/docker-tag.1 create mode 100644 contrib/man/old-man/docker.1 diff --git a/contrib/man/md/docker-build.md b/contrib/man/md/docker-build.md index 255c671951..d96e07e527 100644 --- a/contrib/man/md/docker-build.md +++ b/contrib/man/md/docker-build.md @@ -15,11 +15,10 @@ directory to the Docker daemon. The contents of this directory would be used by **ADD** commands found within the Dockerfile. Warning, this will send a lot of data to the Docker daemon depending -on the contents of the current directory. - -If the absolute path is provided instead of ‘.’, only the files and -directories required by the **ADD** command from the Dockerfile will -be added to the context and transferred to the Docker daemon. +on the contents of the current directory. he build is run by the Docker +daemon, not by the CLI, so the whole context must be transferred to the daemon. +The Docker CLI reports "Uploading context" when the context is sent to +the daemon. When a single Dockerfile is given as the URL, then no context is set. When a Git repository is set as the **URL**, the repository is used @@ -51,7 +50,7 @@ Docker images can be built using the build command and a Dockerfile: docker build . During the build process Docker creates intermediate images. In order to -remove them, you must explicitly set `--rm=false`. +keep them, you must explicitly set `--rm=false`. docker build --rm=false . diff --git a/contrib/man/md/docker-commit.md b/contrib/man/md/docker-commit.md index 8bc496eb76..84cdca6137 100644 --- a/contrib/man/md/docker-commit.md +++ b/contrib/man/md/docker-commit.md @@ -22,7 +22,7 @@ Using an existing container's name or ID you can create a new image. # EXAMPLES ## Creating a new image from an existing container -And existing Fedora based container has had Apache installed while running +An existing Fedora based container has had Apache installed while running in interactive mode with the bash shell. Apache is also running. To create a new image run docker ps to find the container's ID and then run: diff --git a/contrib/man/old-man/docker-attach.1 b/contrib/man/old-man/docker-attach.1 new file mode 100644 index 0000000000..f0879d7507 --- /dev/null +++ b/contrib/man/old-man/docker-attach.1 @@ -0,0 +1,56 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-attach.1 +.\" +.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" +.SH NAME +docker-attach \- Attach to a running container +.SH SYNOPSIS +.B docker attach +\fB--no-stdin\fR[=\fIfalse\fR] +\fB--sig-proxy\fR[=\fItrue\fR] +container +.SH DESCRIPTION +If you \fBdocker run\fR a container in detached mode (\fB-d\fR), you can reattach to the detached container with \fBdocker attach\fR using the container's ID or name. +.sp +You can detach from the container again (and leave it running) with CTRL-c (for a quiet exit) or CTRL-\ to get a stacktrace of the Docker client when it quits. When you detach from the container the exit code will be returned to the client. +.SH "OPTIONS" +.TP +.B --no-stdin=\fItrue\fR|\fIfalse\fR: +When set to true, do not attach to stdin. The default is \fIfalse\fR. +.TP +.B --sig-proxy=\fItrue\fR|\fIfalse\fR: +When set to true, proxify all received signal to the process (even in non-tty mode). The default is \fItrue\fR. +.sp +.SH EXAMPLES +.sp +.PP +.B Attaching to a container +.TP +In this example the top command is run inside a container, from an image called fedora, in detached mode. The ID from the container is passed into the \fBdocker attach\fR command: +.sp +.nf +.RS +# ID=$(sudo docker run -d fedora /usr/bin/top -b) +# sudo docker attach $ID +top - 02:05:52 up 3:05, 0 users, load average: 0.01, 0.02, 0.05 +Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie +Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st +Mem: 373572k total, 355560k used, 18012k free, 27872k buffers +Swap: 786428k total, 0k used, 786428k free, 221740k cached + +PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND +1 root 20 0 17200 1116 912 R 0 0.3 0:00.03 top + +top - 02:05:55 up 3:05, 0 users, load average: 0.01, 0.02, 0.05 +Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie +Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st +Mem: 373572k total, 355244k used, 18328k free, 27872k buffers +Swap: 786428k total, 0k used, 786428k free, 221776k cached + +PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND +1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top +.RE +.fi +.sp +.SH HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-build.1 b/contrib/man/old-man/docker-build.1 new file mode 100644 index 0000000000..6546b7be2a --- /dev/null +++ b/contrib/man/old-man/docker-build.1 @@ -0,0 +1,65 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-build.1 +.\" +.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" +.SH NAME +docker-build \- Build a container image from a Dockerfile source at PATH +.SH SYNOPSIS +.B docker build +[\fB--no-cache\fR[=\fIfalse\fR] +[\fB-q\fR|\fB--quiet\fR[=\fIfalse\fR] +[\fB--rm\fR[=\fitrue\fR]] +[\fB-t\fR|\fB--tag\fR=\fItag\fR] +PATH | URL | - +.SH DESCRIPTION +This will read the Dockerfile from the directory specified in \fBPATH\fR. It also sends any other files and directories found in the current directory to the Docker daemon. The contents of this directory would be used by ADD command found within the Dockerfile. +Warning, this will send a lot of data to the Docker daemon if the current directory contains a lot of data. +If the absolute path is provided instead of ‘.’, only the files and directories required by the ADD commands from the Dockerfile will be added to the context and transferred to the Docker daemon. +.sp +When a single Dockerfile is given as URL, then no context is set. When a Git repository is set as URL, the repository is used as context. +.SH "OPTIONS" +.TP +.B -q, --quiet=\fItrue\fR|\fIfalse\fR: +When set to true, suppress verbose build output. Default is \fIfalse\fR. +.TP +.B --rm=\fItrue\fr|\fIfalse\fR: +When true, remove intermediate containers that are created during the build process. The default is true. +.TP +.B -t, --tag=\fItag\fR: +Tag to be applied to the resulting image on successful completion of the build. +.TP +.B --no-cache=\fItrue\fR|\fIfalse\fR +When set to true, do not use a cache when building the image. The default is \fIfalse\fR. +.sp +.SH EXAMPLES +.sp +.sp +.B Building an image from current directory +.TP +USing a Dockerfile, Docker images are built using the build command: +.sp +.RS +docker build . +.RE +.sp +If, for some reasone, you do not what to remove the intermediate containers created during the build you must set--rm=false. +.sp +.RS +docker build --rm=false . +.sp +.RE +.sp +A good practice is to make a subdirectory with a related name and create the Dockerfile in that directory. E.g. a directory called mongo may contain a Dockerfile for a MongoDB image, or a directory called httpd may contain an Dockerfile for an Apache web server. +.sp +It is also good practice to add the files required for the image to the subdirectory. These files will be then specified with the `ADD` instruction in the Dockerfile. Note: if you include a tar file, which is good practice, then Docker will automatically extract the contents of the tar file specified in the `ADD` instruction into the specified target. +.sp +.B Building an image container using a URL +.TP +This will clone the Github repository and use it as context. The Dockerfile at the root of the repository is used as Dockerfile. This only works if the Github repository is a dedicated repository. Note that you can specify an arbitrary Git repository by using the ‘git://’ schema. +.sp +.RS +docker build github.com/scollier/Fedora-Dockerfiles/tree/master/apache +.RE +.sp +.SH HISTORY +March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-images.1 b/contrib/man/old-man/docker-images.1 new file mode 100644 index 0000000000..e540ba2b79 --- /dev/null +++ b/contrib/man/old-man/docker-images.1 @@ -0,0 +1,84 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-images.1 +.\" +.TH "DOCKER" "1" "April 2014" "0.1" "Docker" +.SH NAME +docker-images \- List the images in the local repository +.SH SYNOPSIS +.B docker images +[\fB-a\fR|\fB--all\fR=\fIfalse\fR] +[\fB--no-trunc\fR[=\fIfalse\fR] +[\fB-q\fR|\fB--quiet\fR[=\fIfalse\fR] +[\fB-t\fR|\fB--tree\fR=\fIfalse\fR] +[\fB-v\fR|\fB--viz\fR=\fIfalse\fR] +[NAME] +.SH DESCRIPTION +This command lists the images stored in the local Docker repository. +.sp +By default, intermediate images, used during builds, are not listed. Some of the output, e.g. image ID, is truncated, for space reasons. However the truncated image ID, and often the first few characters, are enough to be used in other Docker commands that use the image ID. The output includes repository, tag, image ID, date created and the virtual size. +.sp +The title REPOSITORY for the first title may seem confusing. It is essentially the image name. However, because you can tag a specific image, and multiple tags (image instances) can be associated with a single name, the name is really a repository for all tagged images of the same name. +.SH "OPTIONS" +.TP +.B -a, --all=\fItrue\fR|\fIfalse\fR: +When set to true, also include all intermediate images in the list. The default is false. +.TP +.B --no-trunc=\fItrue\fR|\fIfalse\fR: +When set to true, list the full image ID and not the truncated ID. The default is false. +.TP +.B -q, --quiet=\fItrue\fR|\fIfalse\fR: +When set to true, list the complete image ID as part of the output. The default is false. +.TP +.B -t, --tree=\fItrue\fR|\fIfalse\fR: +When set to true, list the images in a tree dependency tree (hierarchy) format. The default is false. +.TP +.B -v, --viz=\fItrue\fR|\fIfalse\fR +When set to true, list the graph in graphviz format. The default is \fIfalse\fR. +.sp +.SH EXAMPLES +.sp +.B Listing the images +.TP +To list the images in a local repository (not the registry) run: +.sp +.RS +docker images +.RE +.sp +The list will contain the image repository name, a tag for the image, and an image ID, when it was created and its virtual size. Columns: REPOSITORY, TAG, IMAGE ID, CREATED, and VIRTUAL SIZE. +.sp +To get a verbose list of images which contains all the intermediate images used in builds use \fB-a\fR: +.sp +.RS +docker images -a +.RE +.sp +.B List images dependency tree hierarchy +.TP +To list the images in the local repository (not the registry) in a dependency tree format then use the \fB-t\fR|\fB--tree=true\fR option. +.sp +.RS +docker images -t +.RE +.sp +This displays a staggered hierarchy tree where the less indented image is the oldest with dependent image layers branching inward (to the right) on subsequent lines. The newest or top level image layer is listed last in any tree branch. +.sp +.B List images in GraphViz format +.TP +To display the list in a format consumable by a GraphViz tools run with \fB-v\fR|\fB--viz=true\fR. For example to produce a .png graph file of the hierarchy use: +.sp +.RS +docker images --viz | dot -Tpng -o docker.png +.sp +.RE +.sp +.B Listing only the shortened image IDs +.TP +Listing just the shortened image IDs. This can be useful for some automated tools. +.sp +.RS +docker images -q +.RE +.sp +.SH HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-info.1 b/contrib/man/old-man/docker-info.1 new file mode 100644 index 0000000000..dca2600af0 --- /dev/null +++ b/contrib/man/old-man/docker-info.1 @@ -0,0 +1,39 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-info.1 +.\" +.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" +.SH NAME +docker-info \- Display system wide information +.SH SYNOPSIS +.B docker info +.SH DESCRIPTION +This command displays system wide information regarding the Docker installation. Information displayed includes the number of containers and images, pool name, data file, metadata file, data space used, total data space, metadata space used, total metadata space, execution driver, and the kernel version. +.sp +The data file is where the images are stored and the metadata file is where the meta data regarding those images are stored. When run for the first time Docker allocates a certain amount of data space and meta data space from the space available on the volume where /var/lib/docker is mounted. +.SH "OPTIONS" +There are no available options. +.sp +.SH EXAMPLES +.sp +.B Display Docker system information +.TP +Here is a sample output: +.sp +.RS + # docker info + Containers: 18 + Images: 95 + Storage Driver: devicemapper + Pool Name: docker-8:1-170408448-pool + Data file: /var/lib/docker/devicemapper/devicemapper/data + Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata + Data Space Used: 9946.3 Mb + Data Space Total: 102400.0 Mb + Metadata Space Used: 9.9 Mb + Metadata Space Total: 2048.0 Mb + Execution Driver: native-0.1 + Kernel Version: 3.10.0-116.el7.x86_64 +.RE +.sp +.SH HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-inspect.1 b/contrib/man/old-man/docker-inspect.1 new file mode 100644 index 0000000000..225125e564 --- /dev/null +++ b/contrib/man/old-man/docker-inspect.1 @@ -0,0 +1,237 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-inspect.1 +.\" +.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" +.SH NAME +docker-inspect \- Return low-level information on a container/image +.SH SYNOPSIS +.B docker inspect +[\fB-f\fR|\fB--format\fR="" +CONTAINER|IMAGE [CONTAINER|IMAGE...] +.SH DESCRIPTION +This displays all the information available in Docker for a given container or image. By default, this will render all results in a JSON array. If a format is specified, the given template will be executed for each result. +.SH "OPTIONS" +.TP +.B -f, --format="": +The text/template package of Go describes all the details of the format. See examples section +.SH EXAMPLES +.sp +.PP +.B Getting information on a container +.TP +To get information on a container use it's ID or instance name +.sp +.fi +.RS +#docker inspect 1eb5fabf5a03 + +[{ + "ID": "1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b", + "Created": "2014-04-04T21:33:52.02361335Z", + "Path": "/usr/sbin/nginx", + "Args": [], + "Config": { + "Hostname": "1eb5fabf5a03", + "Domainname": "", + "User": "", + "Memory": 0, + "MemorySwap": 0, + "CpuShares": 0, + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "PortSpecs": null, + "ExposedPorts": { + "80/tcp": {} + }, + "Tty": true, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": [ + "/usr/sbin/nginx" + ], + "Dns": null, + "DnsSearch": null, + "Image": "summit/nginx", + "Volumes": null, + "VolumesFrom": "", + "WorkingDir": "", + "Entrypoint": null, + "NetworkDisabled": false, + "OnBuild": null, + "Context": { + "mount_label": "system_u:object_r:svirt_sandbox_file_t:s0:c0,c650", + "process_label": "system_u:system_r:svirt_lxc_net_t:s0:c0,c650" + } + }, + "State": { + "Running": true, + "Pid": 858, + "ExitCode": 0, + "StartedAt": "2014-04-04T21:33:54.16259207Z", + "FinishedAt": "0001-01-01T00:00:00Z", + "Ghost": false + }, + "Image": "df53773a4390e25936f9fd3739e0c0e60a62d024ea7b669282b27e65ae8458e6", + "NetworkSettings": { + "IPAddress": "172.17.0.2", + "IPPrefixLen": 16, + "Gateway": "172.17.42.1", + "Bridge": "docker0", + "PortMapping": null, + "Ports": { + "80/tcp": [ + { + "HostIp": "0.0.0.0", + "HostPort": "80" + } + ] + } + }, + "ResolvConfPath": "/etc/resolv.conf", + "HostnamePath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/hostname", + "HostsPath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/hosts", + "Name": "/ecstatic_ptolemy", + "Driver": "devicemapper", + "ExecDriver": "native-0.1", + "Volumes": {}, + "VolumesRW": {}, + "HostConfig": { + "Binds": null, + "ContainerIDFile": "", + "LxcConf": [], + "Privileged": false, + "PortBindings": { + "80/tcp": [ + { + "HostIp": "0.0.0.0", + "HostPort": "80" + } + ] + }, + "Links": null, + "PublishAllPorts": false, + "DriverOptions": { + "lxc": null + }, + "CliAddress": "" + } +.RE +.nf +.sp +.B Getting the IP address of a container instance +.TP +To get the IP address of a container use: +.sp +.fi +.RS +# docker inspect --format='{{.NetworkSettings.IPAddress}}' 1eb5fabf5a03 + +172.17.0.2 +.RE +.nf +.sp +.B Listing all port bindings +.TP +One can loop over arrays and maps in the results to produce simple text output: +.sp +.fi +.RS +# docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' 1eb5fabf5a03 + +80/tcp -> 80 +.RE +.nf +.sp +.B Getting information on an image +.TP +Use an image's ID or name (e.g. repository/name[:tag]) to get information on it. +.sp +.fi +.RS +docker inspect 58394af37342 +[{ + "id": "58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9", + "parent": "8abc22fbb04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", + "created": "2014-02-03T16:10:40.500814677Z", + "container": "f718f19a28a5147da49313c54620306243734bafa63c76942ef6f8c4b4113bc5", + "container_config": { + "Hostname": "88807319f25e", + "Domainname": "", + "User": "", + "Memory": 0, + "MemorySwap": 0, + "CpuShares": 0, + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "PortSpecs": null, + "ExposedPorts": null, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": [ + "/bin/sh", + "-c", + "#(nop) ADD fedora-20-medium.tar.xz in /" + ], + "Dns": null, + "DnsSearch": null, + "Image": "8abc22fbb04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", + "Volumes": null, + "VolumesFrom": "", + "WorkingDir": "", + "Entrypoint": null, + "NetworkDisabled": false, + "OnBuild": null, + "Context": null + }, + "docker_version": "0.6.3", + "author": "Lokesh Mandvekar \u003clsm5@redhat.com\u003e - ./buildcontainers.sh", + "config": { + "Hostname": "88807319f25e", + "Domainname": "", + "User": "", + "Memory": 0, + "MemorySwap": 0, + "CpuShares": 0, + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "PortSpecs": null, + "ExposedPorts": null, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": null, + "Dns": null, + "DnsSearch": null, + "Image": "8abc22fbb04266308ff408ca61cb8f6f4244a59308f7efc64e54b08b496c58db", + "Volumes": null, + "VolumesFrom": "", + "WorkingDir": "", + "Entrypoint": null, + "NetworkDisabled": false, + "OnBuild": null, + "Context": null + }, + "architecture": "x86_64", + "Size": 385520098 +}] +.RE +.nf +.sp +.SH HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-rm.1 b/contrib/man/old-man/docker-rm.1 new file mode 100644 index 0000000000..b06e014d3b --- /dev/null +++ b/contrib/man/old-man/docker-rm.1 @@ -0,0 +1,45 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-rm.1 +.\" +.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" +.SH NAME +docker-rm \- Remove one or more containers. +.SH SYNOPSIS +.B docker rm +[\fB-f\fR|\fB--force\fR[=\fIfalse\fR] +[\fB-l\fR|\fB--link\fR[=\fIfalse\fR] +[\fB-v\fR|\fB--volumes\fR[=\fIfalse\fR] +CONTAINER [CONTAINER...] +.SH DESCRIPTION +This will remove one or more containers from the host node. The container name or ID can be used. This does not remove images. You cannot remove a running container unless you use the \fB-f\fR option. To see all containers on a host use the \fBdocker ps -a\fR command. +.SH "OPTIONS" +.TP +.B -f, --force=\fItrue\fR|\fIfalse\fR: +When set to true, force the removal of the container. The default is \fIfalse\fR. +.TP +.B -l, --link=\fItrue\fR|\fIfalse\fR: +When set to true, remove the specified link and not the underlying container. The default is \fIfalse\fR. +.TP +.B -v, --volumes=\fItrue\fR|\fIfalse\fR: +When set to true, remove the volumes associated to the container. The default is \fIfalse\fR. +.SH EXAMPLES +.sp +.PP +.B Removing a container using its ID +.TP +To remove a container using its ID, find either from a \fBdocker ps -a\fR command, or use the ID returned from the \fBdocker run\fR command, or retrieve it from a file used to store it using the \fBdocker run --cidfile\fR: +.sp +.RS +docker rm abebf7571666 +.RE +.sp +.B Removing a container using the container name: +.TP +The name of the container can be found using the \fBdocker ps -a\fR command. The use that name as follows: +.sp +.RS +docker rm hopeful_morse +.RE +.sp +.SH HISTORY +March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-rm.md b/contrib/man/old-man/docker-rm.md new file mode 100644 index 0000000000..a53aa77c98 --- /dev/null +++ b/contrib/man/old-man/docker-rm.md @@ -0,0 +1,50 @@ +DOCKER "1" "APRIL 2014" "0.1" "Docker" +======================================= + +NAME +---- + +docker-rm - Remove one or more containers. + +SYNOPSIS +-------- + +`docker rm` [`-f`|`--force`[=*false*] [`-l`|`--link`[=*false*] [`-v`|`--volumes`[=*false*] +CONTAINER [CONTAINER...] + +DESCRIPTION +----------- + +`docker rm` will remove one or more containers from the host node. The container name or ID can be used. This does not remove images. You cannot 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. + +OPTIONS +------- + +`-f`, `--force`=*true*|*false*: + When set to true, force the removal of the container. The default is *false*. + +`-l`, `--link`=*true*|*false*: + When set to true, remove the specified link and not the underlying container. The default is *false*. + +`-v`, `--volumes`=*true*|*false*: + When set to true, remove the volumes associated to the container. The default is *false*. + +EXAMPLES +-------- + +##Removing a container using its ID## + +To remove a container using its ID, find either from a `docker ps -a` command, or use the ID returned from the `docker run` command, or retrieve it from a file used to store it using the `docker run --cidfile`: + + docker rm abebf7571666 + +##Removing a container using the container name## + +The name of the container can be found using the \fBdocker ps -a\fR command. The use that name as follows: + + docker rm hopeful_morse + +HISTORY +------- + +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-rmi.1 b/contrib/man/old-man/docker-rmi.1 new file mode 100644 index 0000000000..6f33446ecd --- /dev/null +++ b/contrib/man/old-man/docker-rmi.1 @@ -0,0 +1,29 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-run.1 +.\" +.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" +.SH NAME +docker-rmi \- Remove one or more images. +.SH SYNOPSIS +.B docker rmi +[\fB-f\fR|\fB--force\fR[=\fIfalse\fR] +IMAGE [IMAGE...] +.SH DESCRIPTION +This will remove one or more images from the host node. This does not remove images from a registry. You cannot remove an image of a running container unless you use the \fB-f\fR option. To see all images on a host use the \fBdocker images\fR command. +.SH "OPTIONS" +.TP +.B -f, --force=\fItrue\fR|\fIfalse\fR: +When set to true, force the removal of the image. The default is \fIfalse\fR. +.SH EXAMPLES +.sp +.PP +.B Removing an image +.TP +Here is an example of removing and image: +.sp +.RS +docker rmi fedora/httpd +.RE +.sp +.SH HISTORY +March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-run.1 b/contrib/man/old-man/docker-run.1 new file mode 100644 index 0000000000..fd449374e3 --- /dev/null +++ b/contrib/man/old-man/docker-run.1 @@ -0,0 +1,277 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-run.1 +.\" +.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" +.SH NAME +docker-run \- Run a process in an isolated container +.SH SYNOPSIS +.B docker run +[\fB-a\fR|\fB--attach\fR[=]] [\fB-c\fR|\fB--cpu-shares\fR[=0] [\fB-m\fR|\fB--memory\fR=\fImemory-limit\fR] +[\fB--cidfile\fR=\fIfile\fR] [\fB-d\fR|\fB--detach\fR[=\fIfalse\fR]] [\fB--dns\fR=\fIIP-address\fR] +[\fB--name\fR=\fIname\fR] [\fB-u\fR|\fB--user\fR=\fIusername\fR|\fIuid\fR] +[\fB--link\fR=\fIname\fR:\fIalias\fR] +[\fB-e\fR|\fB--env\fR=\fIenvironment\fR] [\fB--entrypoint\fR=\fIcommand\fR] +[\fB--expose\fR=\fIport\fR] [\fB-P\fR|\fB--publish-all\fR[=\fIfalse\fR]] +[\fB-p\fR|\fB--publish\fR=\fIport-mappping\fR] [\fB-h\fR|\fB--hostname\fR=\fIhostname\fR] +[\fB--rm\fR[=\fIfalse\fR]] [\fB--priviledged\fR[=\fIfalse\fR] +[\fB-i\fR|\fB--interactive\fR[=\fIfalse\fR] +[\fB-t\fR|\fB--tty\fR[=\fIfalse\fR]] [\fB--lxc-conf\fR=\fIoptions\fR] +[\fB-n\fR|\fB--networking\fR[=\fItrue\fR]] +[\fB-v\fR|\fB--volume\fR=\fIvolume\fR] [\fB--volumes-from\fR=\fIcontainer-id\fR] +[\fB-w\fR|\fB--workdir\fR=\fIdirectory\fR] [\fB--sig-proxy\fR[=\fItrue\fR]] +IMAGE [COMMAND] [ARG...] +.SH DESCRIPTION +.PP +Run a process in a new container. \fBdocker run\fR starts a process with its own file system, its own networking, and its own isolated process tree. The \fIIMAGE\fR which starts the process may define defaults related to the process that will be run in the container, the networking to expose, and more, but \fBdocker run\fR gives final control to the operator or administrator who starts the container from the image. For that reason \fBdocker run\fR has more options than any other docker command. + +If the \fIIMAGE\fR is not already loaded then \fBdocker run\fR will pull the \fIIMAGE\fR, and all image dependencies, from the repository in the same way running \fBdocker pull\fR \fIIMAGE\fR, before it starts the container from that image. + + +.SH "OPTIONS" + +.TP +.B -a, --attach=\fIstdin\fR|\fIstdout\fR|\fIstderr\fR: +Attach to stdin, stdout or stderr. In foreground mode (the default when -d is not specified), \fBdocker run\fR can start the process in the container and attach the console to the process’s standard input, output, and standard error. It can even pretend to be a TTY (this is what most commandline executables expect) and pass along signals. The \fB-a\fR option can be set for each of stdin, stdout, and stderr. + +.TP +.B -c, --cpu-shares=0: +CPU shares in relative weight. You can increase the priority of a container with the -c option. By default, all containers run at the same priority and get 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 \fBdocker run\fR. + +.TP +.B -m, --memory=\fImemory-limit\fR: +Allows you to constrain the memory available to a container. If the host supports swap memory, then the -m memory setting can be larger than physical RAM. The memory limit format: , where unit = b, k, m or g. + +.TP +.B --cidfile=\fIfile\fR: +Write the container ID to the file specified. + +.TP +.B -d, --detach=\fItrue\fR|\fIfalse\fR: +Detached mode. This runs the container in the background. It outputs the new container's id and and error messages. At any time you can run \fBdocker ps\fR in the other shell to view a list of the running containers. You can reattach to a detached container with \fBdocker attach\fR. If you choose to run a container in the detached mode, then you cannot use the -rm option. + +.TP +.B --dns=\fIIP-address\fR: +Set custom DNS servers. This option can be used to override the DNS configuration passed to the container. Typically this is necessary when the host DNS configuration is invalid for the container (eg. 127.0.0.1). When this is the case the \fB-dns\fR flags is necessary for every run. + +.TP +.B -e, --env=\fIenvironment\fR: +Set environment variables. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container. + +.TP +.B --entrypoint=\ficommand\fR: +This option allows you to overwrite the default entrypoint of the image that is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND because it specifies what executable to run when the container starts, but it is (purposely) more difficult to override. The ENTRYPOINT gives a container its default nature or behavior, so that when you set an ENTRYPOINT you can run the container as if it were that binary, complete with default options, and you can pass in more options via the COMMAND. But, sometimes an operator may want to run something else inside the container, so you can override the default ENTRYPOINT at runtime by using a \fB--entrypoint\fR and a string to specify the new ENTRYPOINT. + +.TP +.B --expose=\fIport\fR: +Expose a port from the container without publishing it to your host. A containers port can be exposed to other containers in three ways: 1) The developer can expose the port using the EXPOSE parameter of the Dockerfile, 2) the operator can use the \fB--expose\fR option with \fBdocker run\fR, or 3) the container can be started with the \fB--link\fR. + +.TP +.B -P, --publish-all=\fItrue\fR|\fIfalse\fR: +When set to true publish all exposed ports to the host interfaces. The default is false. If the operator uses -P (or -p) then Docker will make the exposed port accessible on the host and the ports will be available to any client that can reach the host. To find the map between the host ports and the exposed ports, use \fBdocker port\fR. + +.TP +.B -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) + +.TP +.B -h , --hostname=\fIhostname\fR: +Sets the container host name that is available inside the container. + +.TP +.B -i , --interactive=\fItrue\fR|\fIfalse\fR: +When set to true, keep stdin open even if not attached. The default is false. + +.TP +.B --link=\fIname\fR:\fIalias\fR: +Add link to another container. The format is name:alias. If the operator uses \fB--link\fR when starting the new client container, then the client container can access the exposed port via a private networking interface. Docker will set some environment variables in the client container to help indicate which interface and port to use. + +.TP +.B -n, --networking=\fItrue\fR|\fIfalse\fR: +By default, all containers have networking enabled (true) and can make outgoing connections. The operator can disable networking with \fB--networking\fR to false. This disables all incoming and outgoing networking. In cases like this, I/O can only be performed through files or by using STDIN/STDOUT. + +Also by default, the container will use the same DNS servers as the host. but you canThe operator may override this with \fB-dns\fR. + +.TP +.B --name=\fIname\fR: +Assign a name to the container. The operator can identify a container in three ways: +.sp +.nf +UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) +UUID short identifier (“f78375b1c487”) +Name (“jonah”) +.fi +.sp +The UUID identifiers come from the Docker daemon, and if a name is not assigned to the container with \fB--name\fR then the daemon will also generate a random string name. The name is useful when defining links (see \fB--link\fR) (or any other place you need to identify a container). This works for both background and foreground Docker containers. + +.TP +.B --privileged=\fItrue\fR|\fIfalse\fR: +Give extended privileges to this container. By default, Docker containers are “unprivileged” (=false) and cannot, for example, run a Docker daemon inside the Docker container. This is because by default a container is not allowed to access any devices. A “privileged” container is given access to all devices. + +When the operator executes \fBdocker run -privileged\fR, Docker will enable access to all devices on the host as well as set some configuration in AppArmor (\fB???\fR) to allow the container nearly all the same access to the host as processes running outside of a container on the host. + +.TP +.B --rm=\fItrue\fR|\fIfalse\fR: +If set to \fItrue\fR the container is automatically removed when it exits. The default is \fIfalse\fR. This option is incompatible with \fB-d\fR. + +.TP +.B --sig-proxy=\fItrue\fR|\fIfalse\fR: +When set to true, proxify all received signals to the process (even in non-tty mode). The default is true. + +.TP +.B -t, --tty=\fItrue\fR|\fIfalse\fR: +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 interactive shell. The default is value is false. + +.TP +.B -u, --user=\fIusername\fR,\fRuid\fR: +Set a username or UID for the container. + +.TP +.B -v, --volume=\fIvolume\fR: +Bind mount a volume to the container. The \fB-v\fR option can be used one or more times to add one or more mounts to a container. These mounts can then be used in other containers using the \fB--volumes-from\fR option. See examples. + +.TP +.B --volumes-from=\fIcontainer-id\fR: +Will mount volumes from the specified container identified by container-id. Once a volume is mounted in a one container it can be shared with other containers using the \fB--volumes-from\fR option when running those other containers. The volumes can be shared even if the original container with the mount is not running. + +.TP +.B -w, --workdir=\fIdirectory\fR: +Working directory inside the container. The default working directory for running binaries within a container is the root directory (/). The developer can set a different default with the Dockerfile WORKDIR instruction. The operator can override the working directory by using the \fB-w\fR option. + +.TP +.B IMAGE: +The image name or ID. + +.TP +.B COMMAND: +The command or program to run inside the image. + +.TP +.B ARG: +The arguments for the command to be run in the container. + +.SH EXAMPLES +.sp +.sp +.B Exposing log messages from the container to the host's log +.TP +If you want messages that are logged in your container to show up in the host's syslog/journal then you should bind mount the /var/log directory as follows. +.sp +.RS +docker run -v /dev/log:/dev/log -i -t fedora /bin/bash +.RE +.sp +From inside the container you can test this by sending a message to the log. +.sp +.RS +logger "Hello from my container" +.sp +.RE +Then exit and check the journal. +.RS +.sp +exit +.sp +journalctl -b | grep hello +.RE +.sp +This should list the message sent to logger. +.sp +.B Attaching to one or more from STDIN, STDOUT, STDERR +.TP +If you do not specify -a then Docker will attach everything (stdin,stdout,stderr). You can specify to which of the three standard streams (stdin, stdout, stderr) you’d like to connect instead, as in: +.sp +.RS +docker run -a stdin -a stdout -i -t fedora /bin/bash +.RE +.sp +.B Linking Containers +.TP +The link feature allows multiple containers to communicate with each other. For example, a container whose Dockerfile has exposed port 80 can be run and named as follows: +.sp +.RS +docker run --name=link-test -d -i -t fedora/httpd +.RE +.sp +.TP +A second container, in this case called linker, can communicate with the httpd container, named link-test, by running with the \fB--link=:\fR +.sp +.RS +docker run -t -i --link=link-test:lt --name=linker fedora /bin/bash +.RE +.sp +.TP +Now the container linker is linked to container link-test with the alias lt. Running the \fBenv\fR command in the linker container shows environment variables with the LT (alias) context (\fBLT_\fR) +.sp +.nf +.RS +# env +HOSTNAME=668231cb0978 +TERM=xterm +LT_PORT_80_TCP=tcp://172.17.0.3:80 +LT_PORT_80_TCP_PORT=80 +LT_PORT_80_TCP_PROTO=tcp +LT_PORT=tcp://172.17.0.3:80 +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +PWD=/ +LT_NAME=/linker/lt +SHLVL=1 +HOME=/ +LT_PORT_80_TCP_ADDR=172.17.0.3 +_=/usr/bin/env +.RE +.fi +.sp +.TP +When linking two containers Docker will use the exposed ports of the container to create a secure tunnel for the parent to access. +.TP +.sp +.B Mapping Ports for External Usage +.TP +The exposed port of an application can be mapped to a host port using the \fB-p\fR flag. For example a httpd port 80 can be mapped to the host port 8080 using the following: +.sp +.RS +docker run -p 8080:80 -d -i -t fedora/httpd +.RE +.sp +.TP +.B Creating and Mounting a Data Volume Container +.TP +Many applications require the sharing of persistent data across several containers. Docker allows you to create a Data Volume Container that other containers can mount from. For example, create a named container that contains directories /var/volume1 and /tmp/volume2. The image will need to contain these directories so a couple of RUN mkdir instructions might be required for you fedora-data image: +.sp +.RS +docker run --name=data -v /var/volume1 -v /tmp/volume2 -i -t fedora-data true +.sp +docker run --volumes-from=data --name=fedora-container1 -i -t fedora bash +.RE +.sp +.TP +Multiple -volumes-from parameters will bring together multiple data volumes from multiple containers. And it's possible to mount the volumes that came from the DATA container in yet another container via the fedora-container1 intermidiery container, allowing to abstract the actual data source from users of that data: +.sp +.RS +docker run --volumes-from=fedora-container1 --name=fedora-container2 -i -t fedora bash +.RE +.TP +.sp +.B Mounting External Volumes +.TP +To mount a host directory as a container volume, specify the absolute path to the directory and the absolute path for the container directory separated by a colon: +.sp +.RS +docker run -v /var/db:/data1 -i -t fedora bash +.RE +.sp +.TP +When using SELinux, be aware that the host has no knowledge of container SELinux policy. Therefore, in the above example, if SELinux policy is enforced, the /var/db directory is not writable to the container. A "Permission Denied" message will occur and an avc: message in the host's syslog. +.sp +.TP +To work around this, at time of writing this man page, the following command needs to be run in order for the proper SELinux policy type label to be attached to the host directory: +.sp +.RS +chcon -Rt svirt_sandbox_file_t /var/db +.RE +.sp +.TP +Now, writing to the /data1 volume in the container will be allowed and the changes will also be reflected on the host in /var/db. +.sp +.SH HISTORY +March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker-tag.1 b/contrib/man/old-man/docker-tag.1 new file mode 100644 index 0000000000..df85a1e8c1 --- /dev/null +++ b/contrib/man/old-man/docker-tag.1 @@ -0,0 +1,49 @@ +.\" Process this file with +.\" nroff -man -Tascii docker-tag.1 +.\" +.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" +.SH NAME +docker-tag \- Tag an image in the repository +.SH SYNOPSIS +.B docker tag +[\fB-f\fR|\fB--force\fR[=\fIfalse\fR] +\fBIMAGE\fR [REGISTRYHOST/][USERNAME/]NAME[:TAG] +.SH DESCRIPTION +This will tag an image in the repository. +.SH "OPTIONS" +.TP +.B -f, --force=\fItrue\fR|\fIfalse\fR: +When set to true, force the tag name. The default is \fIfalse\fR. +.TP +.B REGISTRYHOST: +The hostname of the registry if required. This may also include the port separated by a ':' +.TP +.B USERNAME: +The username or other qualifying identifier for the image. +.TP +.B NAME: +The image name. +.TP +.B TAG: +The tag you are assigning to the image. +.SH EXAMPLES +.sp +.PP +.B Tagging an image +.TP +Here is an example where an image is tagged with the tag 'Version-1.0' : +.sp +.RS +docker tag 0e5574283393 fedora/httpd:Version-1.0 +.RE +.sp +.B Tagging an image for an internal repository +.TP +To push an image to an internal Registry and not the default docker.io based registry you must tag it with the registry hostname and port (if needed). +.sp +.RS +docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0 +.RE +.sp +.SH HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. diff --git a/contrib/man/old-man/docker.1 b/contrib/man/old-man/docker.1 new file mode 100644 index 0000000000..4a36e5baf5 --- /dev/null +++ b/contrib/man/old-man/docker.1 @@ -0,0 +1,172 @@ +.\" Process this file with +.\" nroff -man -Tascii docker.1 +.\" +.TH "DOCKER" "1" "APRIL 2014" "0.1" "Docker" +.SH NAME +docker \- Docker image and container command line interface +.SH SYNOPSIS +.B docker [OPTIONS] [COMMAND] [arg...] +.SH DESCRIPTION +\fBdocker\fR has two distinct functions. It is used for starting the Docker daemon and to run the CLI (i.e., to command the daemon to manage images, containers etc.) So \fBdocker\fR is both a server as deamon and a client to the daemon through the CLI. +.sp +To run the Docker deamon you do not specify any of the commands listed below but must specify the \fB-d\fR option. The other options listed below are for the daemon only. +.sp +The Docker CLI has over 30 commands. The commands are listed below and each has its own man page which explain usage and arguements. +.sp +To see the man page for a command run \fBman docker \fR. +.SH "OPTIONS" +.B \-D=false: +Enable debug mode +.TP +.B\-H=[unix:///var/run/docker.sock]: tcp://[host[:port]] to bind or unix://[/path/to/socket] to use. +When host=[0.0.0.0], port=[4243] or path +=[/var/run/docker.sock] is omitted, default values are used. +.TP +.B \-\-api-enable-cors=false +Enable CORS headers in the remote API +.TP +.B \-b="" +Attach containers to a pre\-existing network bridge; use 'none' to disable container networking +.TP +.B \-\-bip="" +Use the provided CIDR notation address for the dynamically created bridge (docker0); Mutually exclusive of \-b +.TP +.B \-d=false +Enable daemon mode +.TP +.B \-\-dns="" +Force Docker to use specific DNS servers +.TP +.B \-g="/var/lib/docker" +Path to use as the root of the Docker runtime +.TP +.B \-\-icc=true +Enable inter\-container communication +.TP +.B \-\-ip="0.0.0.0" +Default IP address to use when binding container ports +.TP +.B \-\-iptables=true +Disable Docker's addition of iptables rules +.TP +.B \-\-mtu=1500 +Set the containers network mtu +.TP +.B \-p="/var/run/docker.pid" +Path to use for daemon PID file +.TP +.B \-r=true +Restart previously running containers +.TP +.B \-s="" +Force the Docker runtime to use a specific storage driver +.TP +.B \-v=false +Print version information and quit +.SH "COMMANDS" +.TP +.B attach +Attach to a running container +.TP +.B build +Build a container from a Dockerfile +.TP +.B commit +Create a new image from a container's changes +.TP +.B cp +Copy files/folders from the containers filesystem to the host at path +.TP +.B diff +Inspect changes on a container's filesystem + +.TP +.B events +Get real time events from the server +.TP +.B export +Stream the contents of a container as a tar archive +.TP +.B history +Show the history of an image +.TP +.B images +List images +.TP +.B import +Create a new filesystem image from the contents of a tarball +.TP +.B info +Display system-wide information +.TP +.B insert +Insert a file in an image +.TP +.B inspect +Return low-level information on a container +.TP +.B kill +Kill a running container (which includes the wrapper process and everything inside it) +.TP +.B load +Load an image from a tar archive +.TP +.B login +Register or Login to a Docker registry server +.TP +.B logs +Fetch the logs of a container +.TP +.B port +Lookup the public-facing port which is NAT-ed to PRIVATE_PORT +.TP +.B ps +List containers +.TP +.B pull +Pull an image or a repository from a Docker registry server +.TP +.B push +Push an image or a repository to a Docker registry server +.TP +.B restart +Restart a running container +.TP +.B rm +Remove one or more containers +.TP +.B rmi +Remove one or more images +.TP +.B run +Run a command in a new container +.TP +.B save +Save an image to a tar archive +.TP +.B search +Search for an image in the Docker index +.TP +.B start +Start a stopped container +.TP +.B stop +Stop a running container +.TP +.B tag +Tag an image into a repository +.TP +.B top +Lookup the running processes of a container +.TP +.B version +Show the Docker version information +.TP +.B wait +Block until a container stops, then print its exit code +.SH EXAMPLES +.sp +For specific examples please see the man page for the specific Docker command. +.sp +.SH HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. From 73257a72ea15cbe67f40cf516129695fae65be33 Mon Sep 17 00:00:00 2001 From: William Henry Date: Mon, 21 Apr 2014 14:28:25 -0600 Subject: [PATCH 8/9] Further edtis based on comments. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) Changes to be committed: modified: contrib/man/md/README.md modified: contrib/man/md/docker-build.md modified: contrib/man/md/docker-cp.md modified: contrib/man/md/docker-logs.md modified: contrib/man/md/docker-push.md --- contrib/man/md/README.md | 14 ++++++++------ contrib/man/md/docker-build.md | 2 +- contrib/man/md/docker-cp.md | 4 ++-- contrib/man/md/docker-logs.md | 2 +- contrib/man/md/docker-push.md | 6 ++++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/contrib/man/md/README.md b/contrib/man/md/README.md index 46a076a929..9994ce79d2 100644 --- a/contrib/man/md/README.md +++ b/contrib/man/md/README.md @@ -44,12 +44,12 @@ Markdown (*.md) files. # Generating man pages from the Markdown files -The recommended approach for generating the man pages using a Docker container -one. Using the supplied Dockerfile, Docker creates a Fedora based container -and isolates the Pandoc installation. This is a seamless process, saving you -from dealing with Pandoc and dependencies on your own computer. +The recommended approach for generating the man pages is via a Docker +container. Using the supplied Dockerfile, Docker will create a Fedora based +container and isolate the Pandoc installation. This is a seamless process, +saving you from dealing with Pandoc and dependencies on your own computer. -## Using the pandoc Container +## Building the Fedora / Pandoc Image There is a Dockerfile provided in the `docker/contrib/man/md` directory. @@ -57,6 +57,8 @@ Using this Dockerfile, create a Docker image tagged `fedora/pandoc`: docker build -t fedora/pandoc . +## Utilizing the Fedora / Pandoc image + Once the image is built, run a container using the image with *volumes*: docker run -v //docker/contrib/man:/pandoc:rw \ @@ -65,5 +67,5 @@ Once the image is built, run a container using the image with *volumes*: The Pandoc Docker container will process the Markdown files and generate the man pages inside the `docker/contrib/man/man1` directory using Docker volumes. For more information on Docker volumes see the man page for -`docker run` and also look at the article [Shared Directories via Volumes] +`docker run` and also look at the article [Sharing Directories via Volumes] (http://docs.docker.io/use/working_with_volumes/). diff --git a/contrib/man/md/docker-build.md b/contrib/man/md/docker-build.md index d96e07e527..679dc577c4 100644 --- a/contrib/man/md/docker-build.md +++ b/contrib/man/md/docker-build.md @@ -15,7 +15,7 @@ directory to the Docker daemon. The contents of this directory would be used by **ADD** commands found within the Dockerfile. Warning, this will send a lot of data to the Docker daemon depending -on the contents of the current directory. he build is run by the Docker +on the contents of the current directory. The build is run by the Docker daemon, not by the CLI, so the whole context must be transferred to the daemon. The Docker CLI reports "Uploading context" when the context is sent to the daemon. diff --git a/contrib/man/md/docker-cp.md b/contrib/man/md/docker-cp.md index 05c88b1228..f787198669 100644 --- a/contrib/man/md/docker-cp.md +++ b/contrib/man/md/docker-cp.md @@ -9,8 +9,8 @@ docker-cp - Copy files/folders from the PATH to the HOSTPATH # DESCRIPTION Copy files/folders from the containers filesystem to the host -path. Paths are relative to the root of the filesystem. Files - can be copied from a running or stopped containers +path. Paths are relative to the root of the filesystem. Files +can be copied from a running or stopped container. # EXAMPLE An important shell script file, created in a bash shell, is copied from diff --git a/contrib/man/md/docker-logs.md b/contrib/man/md/docker-logs.md index ef5e464730..0b9ce867e9 100644 --- a/contrib/man/md/docker-logs.md +++ b/contrib/man/md/docker-logs.md @@ -14,7 +14,7 @@ order when combined with a docker run (i.e. your run may not have generated any logs at the time you execute docker logs). The **docker logs --follow** command combines commands **docker logs** and -**docker attach**. It will first return all logs from the beginning and +**docker attach**. It will first return all logs from the beginning and then continue streaming new output from the container’s stdout and stderr. # OPTIONS diff --git a/contrib/man/md/docker-push.md b/contrib/man/md/docker-push.md index e6f1f51ad6..dbb6e7d1b1 100644 --- a/contrib/man/md/docker-push.md +++ b/contrib/man/md/docker-push.md @@ -8,8 +8,10 @@ docker-push - Push an image or a repository to the registry **docker push** NAME[:TAG] # DESCRIPTION -Push and image or repository to a registry. The registry may the default -[index.docker.io](https://index.docker.io/v1/) or a another registry +Push an image or a repository to a registry. The default registry is the Docker +Index located at [index.docker.io](https://index.docker.io/v1/). However the +image can be pushed to another, perhaps private, registry as demonstrated in +the example below. # EXAMPLE From ac8c705c952b7151cc0bf075742146cac3b93cac Mon Sep 17 00:00:00 2001 From: William Henry Date: Mon, 21 Apr 2014 14:37:08 -0600 Subject: [PATCH 9/9] Changed Image to image. Docker-DCO-1.1-Signed-off-by: William Henry (github: ipbabble) Changes to be committed: modified: contrib/man/md/README.md --- contrib/man/md/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/man/md/README.md b/contrib/man/md/README.md index 9994ce79d2..d49b39b7a2 100644 --- a/contrib/man/md/README.md +++ b/contrib/man/md/README.md @@ -49,7 +49,7 @@ container. Using the supplied Dockerfile, Docker will create a Fedora based container and isolate the Pandoc installation. This is a seamless process, saving you from dealing with Pandoc and dependencies on your own computer. -## Building the Fedora / Pandoc Image +## Building the Fedora / Pandoc image There is a Dockerfile provided in the `docker/contrib/man/md` directory.