How to install docker man pages on Mac os
I have installed docker on mac os as written in the documentation .
But in some docs (like the docker book ) I see recommendations to use man docker-run
( man docker-pull
etc.) ..
But when I run a command like this, I get the error:
bessarabov@bessarabov-osx:~$ man docker
No manual entry for docker
How can I install man docker documentation on Mac OS system?
source to share
It looks like docker has changed a bit 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
source to share
Until the issue is resolved, you can create the man pages manually through the docker container using the supplied Dockerfile and then just copy the generated files to /usr/share/man/
:
# Step 1: checkout docker sources, but make sure you do this
# somewhere in /Users directory because boot2docker can only
# share this path with docker containers
git clone https://github.com/docker/docker.git
# Step 2: build docker image
cd docker/docs/man
docker build -t docker/md2man .
# Step 3: build man pages
docker run -v /Users/<path-to-git-dir>/docker/docs/man:/docs:rw \
-w /docs -i docker/md2man /docs/md2man-all.sh
# Step 4: copy generated man pages to /usr/share/man
cp -R man* /usr/share/man/
Enjoy!
source to share
As of 2017.06.01 you have to git check 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 man directory and do:
make -f docker.Makefile manpages
source to share
It seems that the go / glide bit under the hood of docker / md2man has changed after @gilly's answer. What I ended up doing on Mac OS:
cd /usr/local
git clone https://github.com/docker/docker.git
brew install ruby
gem install md2man
cd docker/man
mkdir man1; for i in *.1.md; md2man-roff $i > man1/${i%.md}; done
cd /usr/local/share/man/man1
for i in ../../../docker/man/man1/*.1; do ln -s $i .; done
source to share