How to get a “person” working in a Gline Linux docker container?

I cannot get man to work in the Docker container for Alpine Linux.

Pull out Alpine Linux and run the container.

 docker pull alpine:latest docker run -t -i alpine /bin/ash 

Update repository indexes from all remote repositories.

 apk update 

Install man and man-pages .

 apk add man man-pages 

Install the package and its documentation.

 apk add curl apk add curl-doc 

Try viewing the manual pages.

 / # man curl /usr/share/man/mandoc.db: No such file or directory man: outdated mandoc.db lacks curl(1) entry, consider running # makewhatis /usr/share/man more: -s: No such file or directory / # 

What?


Update

Following @EugenMayers advice to add mdicml-apropos , I can get curl --manual to work, but not man curl . Unfortunately, gnupg --manual does not work at all. This behavior is inconsistent and unexpected.

+7
linux docker man alpine
source share
3 answers

You need to add

 apk add mdocml-apropos 

and then for each package you need packages for

 apk add curl-doc 

and you are set to use the person after, as you already did

 apk add man man-pages mdocml-apropos 

The source for this (plus the added mdocml-apropos, which is missing there) https://wiki.alpinelinux.org/wiki/Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F , but, by the way, I can not force it I work myself.

Also tried export TERM=xterm to check if iteractivity is in iteractivity , but it is not.

Also tried makewhatis /usr/share/man manually, but without sucess.

Interestingly, however:

 ls -la /usr/share/man/man1/curl-config.1.gz -rw-r--r-- 1 root root 1687 Aug 4 15:07 /usr/share/man/man1/curl-config.1.gz 

So there is a manpage

+5
source share

For me to get rid of this error:

 man man more: -s: No such file or directory 

I use:

 export PAGER=less 

then it works

+4
source share

In fact, this is due to how you are connected to the container. I use alpine a lot with LXD and, as a rule, cannot read any help page when connecting via lxc exec container ash . I assume the docker will connect you to the container the same way.

 $ lxc exec alp03 ash ~ # man man more: -s: No such file or directory 

So you can use su - and then you can use a person:

 ~ # su - alp03:~# man man MAN(1P) POSIX Programmer Manual (...) 

Notice how the prompt differs from the su - command.

In addition, if I start the ssh server inside the container, and then connect to this container via ssh, then the person works fine.

0
source share

All Articles