shrivb shrivb - 5 months ago 47
Bash Question

Docker ubuntu image - bash: man: command not found

Am getting started with Docker and just pulled up a basic ubuntu image. I am on a windows 7 box running Docker via docker-machine.

Do not know why, I am not able to find the man command on bash. I tried exporting the path of man to $PATH but still no joy.

docker@default:~$ docker run -it ubuntu bash
root@2dd12b770666:/# man ls
bash: man: command not found
root@2dd12b770666:/# whereis man
man: /usr/local/man /usr/share/man
root@2dd12b770666:/# export PATH=/usr/local/man:/usr/share/man:$PATH
root@2dd12b770666:/# echo $PATH
root@2dd12b770666:/# man
bash: man: command not found

If export command does not work, not sure if editing bashrc would have any effect. So did not try that yet. Is there anything else I need to do to be able to run man on the docker image?


You have to install man command in the container:

sudo apt-get install man