我在mac os上安装了docker written in documentation。
但是在某些文档中(例如在docker book中),我看到了使用man docker-run
(man docker-pull
等)的推荐。
但是当我运行这样的命令时,我得到错误:
bessarabov@bessarabov-osx:~$ man docker
No manual entry for docker
如何在我的Mac OS系统中安装docker man-documentation?
答案 0 :(得分:4)
自@ Sergiy' s answer以来,看起来码头工人略有变化。这是一个稍微更新的版本,对我有用。
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
答案 1 :(得分:3)
在解决issue之前,您可以使用提供的Dockerfile通过docker容器build man pages manually,然后将生成的文件复制到/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/
享受!
答案 2 :(得分:2)
自2017.06.01起,您必须从
中检出您想要的标签/版本>=
17.06:https://github.com/docker/docker-ce <
17.06:https://github.com/moby/moby 然后,转到components/cli
目录并执行:
make -f docker.Makefile manpages
将联机帮助页添加到manpath:
echo "MANPATH $PWD/man" | sudo tee -a /private/etc/man.conf
答案 3 :(得分:0)
自@ gilly的回答以来,似乎docker / md2man引擎盖下的go / glide位已发生变化。我最终在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