boot2docker / osx-installer

Docker installer for Mac OS X
Apache License 2.0
1.25k stars 258 forks source link

install man pages #66

Closed SvenDowideit closed 6 years ago

bessarabov commented 9 years ago

+1 for this issue. I was searching for this feature so I've asked on stackoverflow (and the answer took me to this issue): http://stackoverflow.com/questions/26368263/how-to-install-docker-man-pages-on-mac-os

cmosetick commented 9 years ago

+1 for man pages on Mac OS X. On my Ubuntu systems running the latest version of Docker, when I type man docker I get actual man pages. We need this on Mac as well.

SvenDowideit commented 9 years ago

(and yes a PR would rock)

cmosetick commented 9 years ago

I imagine the issue here is that since boot2docker on OS X is just a way to get to the hardware virtualized Linux system, docker is not really on "your" system per se. It will not work unless you have the correct environment variables configured to connect to the Linux system. Where as on Linux, it runs natively with out variables. Additionally, it's not customary to have man pages for programs that don't actually run on your system. I still think this needs to be figured out, but I'm not sure of the solution at this point in time.

Idea

Perhaps if docker / boot2docker on OS X had a baked in man page system that could be called in reverse order of what is normally done, like: docker -man or docker run -man or docker build -man where -man is special keyword/switch that docker natively knows about, that would only trigger the baked in man pages to display. (rather than a run or build of a Dockerfile, etc.) A paging mechanism like less is called by docker so users could read one page at a time. Since the docker command would not work unless the boot2docker VM was running, these built in man pages would unavailable unless the boot2docker VM was already running. This would make it more clear to users that the man pages they are referencing are for programs that do not run natively on their system, but still perhaps be confusing at first. Just some thoughts...

SvenDowideit commented 9 years ago

ah, but there is actually a full docker binary installed on your OSX - so the man pages for it are very relevant.

ghost commented 9 years ago

Until the issue is resolved you can build man pages manually via a docker container using the supplied Dockerfile and then just copy 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!

P.S. Answered at stackoverflow.

spoon99 commented 8 years ago

+1

tianon commented 6 years ago

Sorry, this repository is long-since deprecated in favor of Docker Toolbox (whose usage is now also discouraged in favor of Docker for Windows and Docker for Mac).