diff --git a/contrib/mkimage-rinse.sh b/contrib/mkimage-rinse.sh index 69a8bc8fe6..7e0935062f 100755 --- a/contrib/mkimage-rinse.sh +++ b/contrib/mkimage-rinse.sh @@ -80,7 +80,7 @@ sudo mkdir -m 755 dev # effectively: febootstrap-minimize --keep-zoneinfo --keep-rpmdb --keep-services "$target" # locales sudo rm -rf usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} -# docs +# docs and man pages sudo rm -rf usr/share/{man,doc,info,gnome/help} # cracklib sudo rm -rf usr/share/cracklib diff --git a/contrib/mkimage/.febootstrap-minimize b/contrib/mkimage/.febootstrap-minimize index 8a71f5ed67..7749e63fb0 100755 --- a/contrib/mkimage/.febootstrap-minimize +++ b/contrib/mkimage/.febootstrap-minimize @@ -10,7 +10,7 @@ shift # effectively: febootstrap-minimize --keep-zoneinfo --keep-rpmdb --keep-services "$target" # locales rm -rf usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} - # docs + # docs and man pages rm -rf usr/share/{man,doc,info,gnome/help} # cracklib rm -rf usr/share/cracklib diff --git a/docs/README.md b/docs/README.md index bb41dbf10a..9cdb20984a 100755 --- a/docs/README.md +++ b/docs/README.md @@ -280,24 +280,11 @@ aws cloudfront create-invalidation --profile docs.docker.com --distribution-id aws cloudfront create-invalidation --profile docs.docker.com --distribution-id $DISTRIBUTION_ID --invalidation-batch '{"Paths":{"Quantity":1, "Items":["/v1.1/reference/api/docker_io_oauth_api/"]},"CallerReference":"6Mar2015sventest1"}' ``` -### Generate the man pages for Mac OSX +### Generate the man pages -When using Docker on Mac OSX the man pages will be missing by default. You can manually generate them by following these steps: +For information on generating man pages (short for manual page), see [the man +page directory](https://github.com/docker/docker/tree/master/docker) in this +project. -1. Checkout the docker source. You must clone into your `/Users` directory because Boot2Docker can only share this path - with the docker containers. - $ git clone https://github.com/docker/docker.git - -2. Build the docker image. - - $ cd docker/docs/man - $ docker build -t docker/md2man . -3. Build the man pages. - - $ docker run -v /Users//docker/docs/man:/docs:rw -w /docs -i docker/md2man /docs/md2man-all.sh - -4. Copy the generated man pages to `/usr/share/man` - - $ cp -R man* /usr/share/man/ diff --git a/docs/man/README.md b/docs/man/README.md deleted file mode 100644 index e25a925adb..0000000000 --- a/docs/man/README.md +++ /dev/null @@ -1,33 +0,0 @@ -Docker Documentation -==================== - -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. - -# Generating man pages from the Markdown files - -The recommended approach for generating the man pages is via a Docker -container using the supplied `Dockerfile` to create an image with the correct -environment. This uses `go-md2man`, a pure Go Markdown to man page generator. - -## Building the md2man image - -There is a `Dockerfile` provided in the `docker/docs/man` directory. - -Using this `Dockerfile`, create a Docker image tagged `docker/md2man`: - - docker build -t docker/md2man . - -## Utilizing the image - -Once the image is built, run a container using the image with *volumes*: - - docker run -v //docker/docs/man:/docs:rw \ - -w /docs -i docker/md2man /docs/md2man-all.sh - -The `md2man` Docker container will process the Markdown files and generate -the man pages inside the `docker/docs/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 [Sharing Directories via Volumes] -(https://docs.docker.com/use/working_with_volumes/). diff --git a/hack/make/.build-deb/docker-engine.manpages b/hack/make/.build-deb/docker-engine.manpages index d5cff8a479..1aa62186a6 100644 --- a/hack/make/.build-deb/docker-engine.manpages +++ b/hack/make/.build-deb/docker-engine.manpages @@ -1 +1 @@ -docs/man/man*/* +man/man*/* diff --git a/hack/make/.build-deb/rules b/hack/make/.build-deb/rules index 795af471d9..b4c8e2b4c7 100755 --- a/hack/make/.build-deb/rules +++ b/hack/make/.build-deb/rules @@ -9,7 +9,7 @@ override_dh_gencontrol: override_dh_auto_build: ./hack/make.sh dynbinary - # ./docs/man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here + # ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here override_dh_auto_test: ./bundles/$(VERSION)/dynbinary/docker -v diff --git a/hack/make/.build-rpm/docker-engine.spec b/hack/make/.build-rpm/docker-engine.spec index 33dca23173..066161f57c 100644 --- a/hack/make/.build-rpm/docker-engine.spec +++ b/hack/make/.build-rpm/docker-engine.spec @@ -71,7 +71,7 @@ depending on a particular stack or provider. %build ./hack/make.sh dynbinary -# ./docs/man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here +# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here %check ./bundles/%{_origversion}/dynbinary/docker -v @@ -113,9 +113,9 @@ install -p -m 644 contrib/completion/fish/docker.fish $RPM_BUILD_ROOT/usr/share/ # install manpages install -d %{buildroot}%{_mandir}/man1 -install -p -m 644 docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1 +install -p -m 644 man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1 install -d %{buildroot}%{_mandir}/man5 -install -p -m 644 docs/man/man5/*.5 $RPM_BUILD_ROOT/%{_mandir}/man5 +install -p -m 644 man/man5/*.5 $RPM_BUILD_ROOT/%{_mandir}/man5 # add vimfiles install -d $RPM_BUILD_ROOT/usr/share/vim/vimfiles/doc diff --git a/hack/make/build-deb b/hack/make/build-deb index a8b0406172..72860d6b9e 100644 --- a/hack/make/build-deb +++ b/hack/make/build-deb @@ -34,7 +34,7 @@ set -e debDate="$(date --rfc-2822)" # if go-md2man is available, pre-generate the man pages - ./docs/man/md2man-all.sh -q || true + ./man/md2man-all.sh -q || true # TODO decide if it's worth getting go-md2man in _each_ builder environment to avoid this # TODO add a configurable knob for _which_ debs to build so we don't have to modify the file or build all of them every time we need to test diff --git a/hack/make/build-rpm b/hack/make/build-rpm index 8de967317c..6ad01c40c0 100644 --- a/hack/make/build-rpm +++ b/hack/make/build-rpm @@ -38,7 +38,7 @@ set -e rpmDate="$(date +'%a %b %d %Y')" # if go-md2man is available, pre-generate the man pages - ./docs/man/md2man-all.sh -q || true + ./man/md2man-all.sh -q || true # TODO decide if it's worth getting go-md2man in _each_ builder environment to avoid this # TODO add a configurable knob for _which_ rpms to build so we don't have to modify the file or build all of them every time we need to test diff --git a/hack/make/ubuntu b/hack/make/ubuntu index 07265b4a65..a791f9c964 100644 --- a/hack/make/ubuntu +++ b/hack/make/ubuntu @@ -60,10 +60,10 @@ bundle_ubuntu() { cp contrib/completion/fish/docker.fish "$DIR/etc/fish/completions/" # Include contributed man pages - docs/man/md2man-all.sh -q + man/md2man-all.sh -q manRoot="$DIR/usr/share/man" mkdir -p "$manRoot" - for manDir in docs/man/man?; do + for manDir in man/man?; do manBase="$(basename "$manDir")" # "man1" for manFile in "$manDir"/*; do manName="$(basename "$manFile")" # "docker-build.1" diff --git a/docs/man/Dockerfile b/man/Dockerfile similarity index 100% rename from docs/man/Dockerfile rename to man/Dockerfile diff --git a/docs/man/Dockerfile.5.md b/man/Dockerfile.5.md similarity index 100% rename from docs/man/Dockerfile.5.md rename to man/Dockerfile.5.md diff --git a/man/README.md b/man/README.md new file mode 100644 index 0000000000..9a5ed7eb55 --- /dev/null +++ b/man/README.md @@ -0,0 +1,44 @@ +Docker Documentation +==================== + +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. + +# Generating man pages from the Markdown files + +The recommended approach for generating the man pages is via a Docker +container using the supplied `Dockerfile` to create an image with the correct +environment. This uses `go-md2man`, a pure Go Markdown to man page generator. + +### Generate the man pages + +On Linux installations, Docker includes a set of man pages you can access by typing `man command-name` on the command line. For example, `man docker` displays the `docker` man page. When using Docker on Mac OSX the man pages are not automatically included. + +You can generate and install the `man` pages yourself by following these steps: + +1. Checkout the `docker` source. + + $ git clone https://github.com/docker/docker.git + + If you are using Boot2Docker, you must clone into your `/Users` directory + because Boot2Docker can only share this path with the docker containers. + +2. Build the docker image. + + $ cd docker/man + $ docker build -t docker/md2man . + +3. Build the man pages. + + $ docker run -v /docker/man:/man:rw -w /man -i docker/md2man /man/md2man-all.sh + + The `md2man` Docker container processes the Markdown files and generates + a `man1` and `man5` subdirectories in the `docker/man` directory. + +4. Copy the generated man pages to `/usr/share/man` + + $ cp -R man* /usr/share/man/ + + + diff --git a/docs/man/docker-attach.1.md b/man/docker-attach.1.md similarity index 100% rename from docs/man/docker-attach.1.md rename to man/docker-attach.1.md diff --git a/docs/man/docker-build.1.md b/man/docker-build.1.md similarity index 100% rename from docs/man/docker-build.1.md rename to man/docker-build.1.md diff --git a/docs/man/docker-commit.1.md b/man/docker-commit.1.md similarity index 100% rename from docs/man/docker-commit.1.md rename to man/docker-commit.1.md diff --git a/docs/man/docker-cp.1.md b/man/docker-cp.1.md similarity index 100% rename from docs/man/docker-cp.1.md rename to man/docker-cp.1.md diff --git a/docs/man/docker-create.1.md b/man/docker-create.1.md similarity index 100% rename from docs/man/docker-create.1.md rename to man/docker-create.1.md diff --git a/docs/man/docker-diff.1.md b/man/docker-diff.1.md similarity index 100% rename from docs/man/docker-diff.1.md rename to man/docker-diff.1.md diff --git a/docs/man/docker-events.1.md b/man/docker-events.1.md similarity index 100% rename from docs/man/docker-events.1.md rename to man/docker-events.1.md diff --git a/docs/man/docker-exec.1.md b/man/docker-exec.1.md similarity index 100% rename from docs/man/docker-exec.1.md rename to man/docker-exec.1.md diff --git a/docs/man/docker-export.1.md b/man/docker-export.1.md similarity index 100% rename from docs/man/docker-export.1.md rename to man/docker-export.1.md diff --git a/docs/man/docker-history.1.md b/man/docker-history.1.md similarity index 100% rename from docs/man/docker-history.1.md rename to man/docker-history.1.md diff --git a/docs/man/docker-images.1.md b/man/docker-images.1.md similarity index 100% rename from docs/man/docker-images.1.md rename to man/docker-images.1.md diff --git a/docs/man/docker-import.1.md b/man/docker-import.1.md similarity index 100% rename from docs/man/docker-import.1.md rename to man/docker-import.1.md diff --git a/docs/man/docker-info.1.md b/man/docker-info.1.md similarity index 100% rename from docs/man/docker-info.1.md rename to man/docker-info.1.md diff --git a/docs/man/docker-inspect.1.md b/man/docker-inspect.1.md similarity index 100% rename from docs/man/docker-inspect.1.md rename to man/docker-inspect.1.md diff --git a/docs/man/docker-kill.1.md b/man/docker-kill.1.md similarity index 100% rename from docs/man/docker-kill.1.md rename to man/docker-kill.1.md diff --git a/docs/man/docker-load.1.md b/man/docker-load.1.md similarity index 100% rename from docs/man/docker-load.1.md rename to man/docker-load.1.md diff --git a/docs/man/docker-login.1.md b/man/docker-login.1.md similarity index 100% rename from docs/man/docker-login.1.md rename to man/docker-login.1.md diff --git a/docs/man/docker-logout.1.md b/man/docker-logout.1.md similarity index 100% rename from docs/man/docker-logout.1.md rename to man/docker-logout.1.md diff --git a/docs/man/docker-logs.1.md b/man/docker-logs.1.md similarity index 100% rename from docs/man/docker-logs.1.md rename to man/docker-logs.1.md diff --git a/docs/man/docker-pause.1.md b/man/docker-pause.1.md similarity index 100% rename from docs/man/docker-pause.1.md rename to man/docker-pause.1.md diff --git a/docs/man/docker-port.1.md b/man/docker-port.1.md similarity index 100% rename from docs/man/docker-port.1.md rename to man/docker-port.1.md diff --git a/docs/man/docker-ps.1.md b/man/docker-ps.1.md similarity index 100% rename from docs/man/docker-ps.1.md rename to man/docker-ps.1.md diff --git a/docs/man/docker-pull.1.md b/man/docker-pull.1.md similarity index 100% rename from docs/man/docker-pull.1.md rename to man/docker-pull.1.md diff --git a/docs/man/docker-push.1.md b/man/docker-push.1.md similarity index 100% rename from docs/man/docker-push.1.md rename to man/docker-push.1.md diff --git a/docs/man/docker-rename.1.md b/man/docker-rename.1.md similarity index 100% rename from docs/man/docker-rename.1.md rename to man/docker-rename.1.md diff --git a/docs/man/docker-restart.1.md b/man/docker-restart.1.md similarity index 100% rename from docs/man/docker-restart.1.md rename to man/docker-restart.1.md diff --git a/docs/man/docker-rm.1.md b/man/docker-rm.1.md similarity index 100% rename from docs/man/docker-rm.1.md rename to man/docker-rm.1.md diff --git a/docs/man/docker-rmi.1.md b/man/docker-rmi.1.md similarity index 100% rename from docs/man/docker-rmi.1.md rename to man/docker-rmi.1.md diff --git a/docs/man/docker-run.1.md b/man/docker-run.1.md similarity index 100% rename from docs/man/docker-run.1.md rename to man/docker-run.1.md diff --git a/docs/man/docker-save.1.md b/man/docker-save.1.md similarity index 100% rename from docs/man/docker-save.1.md rename to man/docker-save.1.md diff --git a/docs/man/docker-search.1.md b/man/docker-search.1.md similarity index 100% rename from docs/man/docker-search.1.md rename to man/docker-search.1.md diff --git a/docs/man/docker-start.1.md b/man/docker-start.1.md similarity index 100% rename from docs/man/docker-start.1.md rename to man/docker-start.1.md diff --git a/docs/man/docker-stats.1.md b/man/docker-stats.1.md similarity index 100% rename from docs/man/docker-stats.1.md rename to man/docker-stats.1.md diff --git a/docs/man/docker-stop.1.md b/man/docker-stop.1.md similarity index 100% rename from docs/man/docker-stop.1.md rename to man/docker-stop.1.md diff --git a/docs/man/docker-tag.1.md b/man/docker-tag.1.md similarity index 100% rename from docs/man/docker-tag.1.md rename to man/docker-tag.1.md diff --git a/docs/man/docker-top.1.md b/man/docker-top.1.md similarity index 100% rename from docs/man/docker-top.1.md rename to man/docker-top.1.md diff --git a/docs/man/docker-unpause.1.md b/man/docker-unpause.1.md similarity index 100% rename from docs/man/docker-unpause.1.md rename to man/docker-unpause.1.md diff --git a/docs/man/docker-version.1.md b/man/docker-version.1.md similarity index 100% rename from docs/man/docker-version.1.md rename to man/docker-version.1.md diff --git a/docs/man/docker-wait.1.md b/man/docker-wait.1.md similarity index 100% rename from docs/man/docker-wait.1.md rename to man/docker-wait.1.md diff --git a/docs/man/docker.1.md b/man/docker.1.md similarity index 100% rename from docs/man/docker.1.md rename to man/docker.1.md diff --git a/docs/man/md2man-all.sh b/man/md2man-all.sh similarity index 100% rename from docs/man/md2man-all.sh rename to man/md2man-all.sh diff --git a/project/ISSUE-TRIAGE.md b/project/ISSUE-TRIAGE.md index 528dea9c60..be87cd81ed 100644 --- a/project/ISSUE-TRIAGE.md +++ b/project/ISSUE-TRIAGE.md @@ -22,7 +22,7 @@ Before triaging an issue very far, make sure that the issue's author provided th - the output of `uname -a` - a reproducible case if this is a bug, Dockerfiles FTW - host distribution and version ( ubuntu 14.04, RHEL, fedora 21 ) -- page URL if this is a docs issue +- page URL if this is a docs issue or the name of a man page Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem.