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 /usr/local/man:/usr/share/man:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin root@2dd12b770666:/# man bash: man: command not found root@2dd12b770666:/#
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?
This allows a running container to create or modify files and directories in its local filesystem. Docker creates a network interface to connect the container to the default network, since you did not specify any networking options. This includes assigning an IP address to the container.
Docker images are provided for all versions of Ubuntu, including Long Term Support (LTS) releases such as 20.04 and 22.04, and normal releases like 19.04, 19.10, 21.04, and 21.10.
You have to install man
command in the container:
apt-get install man
Note: for a completely fresh docker install, you may need:
apt-get update apt-get install man
(I did:apt-get install man
and got E: Unable to locate package man
at first)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With