Moving man pages out of docs
Adding in other areas per comments Updating with comments; equalizing generating man page info Updating with duglin's comments Doug is right here again;fixing. Signed-off-by: Mary Anthony <mary@docker.com>
This commit is contained in:
parent
add64dc297
commit
eacae64bd8
55 changed files with 60 additions and 62 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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/<path-to-git-dir>/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/
|
||||
|
|
|
@ -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 /<path-to-git-dir>/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/).
|
|
@ -1 +1 @@
|
|||
docs/man/man*/*
|
||||
man/man*/*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
44
man/README.md
Normal file
44
man/README.md
Normal file
|
@ -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 <path-to-git-dir>/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/
|
||||
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue