github.com/ld86/docker@v1.7.1-rc3/man/README.md (about)

     1  Docker Documentation
     2  ====================
     3  
     4  This directory contains the Docker user manual in the Markdown format.
     5  Do *not* edit the man pages in the man1 directory. Instead, amend the
     6  Markdown (*.md) files.
     7  
     8  # Generating man pages from the Markdown files
     9  
    10  The recommended approach for generating the man pages is via a Docker
    11  container using the supplied `Dockerfile` to create an image with the correct
    12  environment. This uses `go-md2man`, a pure Go Markdown to man page generator.
    13  
    14  ## Building the md2man image
    15  
    16  There is a `Dockerfile` provided in the `docker/docs/man` directory.
    17  
    18  Using this `Dockerfile`, create a Docker image tagged `docker/md2man`:
    19  
    20      docker build -t docker/md2man .
    21  
    22  ## Utilizing the image
    23  
    24  Once the image is built, run a container using the image with *volumes*:
    25  
    26      docker run -v /<path-to-git-dir>/docker/docs/man:/docs:rw \
    27      -w /docs -i docker/md2man /docs/md2man-all.sh
    28  
    29  The `md2man` Docker container will process the Markdown files and generate
    30  the man pages inside the `docker/docs/man/man1` directory using
    31  Docker volumes. For more information on Docker volumes see the man page for
    32  `docker run` and also look at the article [Sharing Directories via Volumes]
    33  (https://docs.docker.com/use/working_with_volumes/).