Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install docker man pages on Mac os

I've installed docker on mac os as written in documentation.

But in some docs (for example in the docker book) I see the recomendations to use man docker-run (man docker-pull, etc).

But when I run such command I get the error:

bessarabov@bessarabov-osx:~$ man docker
No manual entry for docker

How can I install docker man-documentation to my Mac OS system?

like image 245
bessarabov Avatar asked Oct 14 '14 18:10

bessarabov


2 Answers

As of 2017.06.01, you have to git checkout your desired tag/version from

  • version >= 17.06: https://github.com/docker/docker-ce
  • version < 17.06: https://github.com/moby/moby

and then, go to the components/cli directory and execute:

make -f docker.Makefile manpages

To add the manpages to the manpath:

echo "MANPATH $PWD/man" | sudo tee -a /private/etc/man.conf

Source: https://github.com/docker/cli/issues/217

like image 121
ninrod Avatar answered Oct 19 '22 19:10

ninrod


It looks like docker has slightly changed since @Sergiy's answer. Here is a slightly updated version that worked for me.

git clone https://github.com/docker/docker.git
cd docker/man                      # looks like the directory has moved up
docker build -t docker/md2man .    # don't forget the '.'
docker run -v $PWD/:/docs:rw -w /docs -i docker/md2man /docs/md2man-all.sh
sudo cp -R man* /usr/share/man/    # you'll likely need sudo access for this
man docker                         # check it worked
like image 4
Gilly Avatar answered Oct 19 '22 18:10

Gilly