I have a minimal Centos 7 Docker image, and I'm trying to get some man pages on it to help in debugging my Dockerfile. Out of the box, it doesn't have much:# man lsNo manual entry for lsPer this Serverfault answer, I installed the man-pages RPM, and that seemed to go fine:# yum install -y man-pagesLoaded plugins: fastestmirror, ovlLoading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * extras: centos.mbni.med.umich.edu * updates: centos.netnitco.netResolving Dependencies--> Running transaction check---> Package man-pages.noarch 0:3.53-5.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved====================================================================================================== Package                  Arch                  Version                     Repository           Size======================================================================================================Installing: man-pages                noarch                3.53-5.el7                  base                5.0 MTransaction Summary======================================================================================================Install  1 PackageTotal download size: 5.0 MInstalled size: 4.6 MDownloading packages:man-pages-3.53-5.el7.noarch.rpm                                                | 5.0 MB  00:00:01     Running transaction checkRunning transaction testTransaction test succeededRunning transaction  Installing : man-pages-3.53-5.el7.noarch                                                        1/1   Verifying  : man-pages-3.53-5.el7.noarch                                                        1/1 Installed:  man-pages.noarch 0:3.53-5.el7                                                                       Complete!However:# man lsNo manual entry for lsI used rpm to check that man-pages was supposed to include the ls man page, and it looks like it does:# rpm -ql man-pages | grep -w ls/usr/share/man/man1p/ls.1p.gzBut it doesn't look like it was actually installed:# man 1p lsNo manual entry for ls in section 1p# ls -l /usr/share/man/man1p/total 0And it doesn't seem to be anywhere else on the filesystem, either.# find / -name ls.1\*#I can create files in /usr/share/man/man1p/, so it's probably not some Docker virtual filesystem weirdness.The best part of this is that what I really wanted right this minute was the man page for the useradd command, which isn't even in that RPM. It's in shadow-utils.# yum whatprovides /usr/share/man/man8/useradd.8.gzLoaded plugins: fastestmirror, ovlLoading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * extras: mirror.tzulo.com * updates: centos.netnitco.net2:shadow-utils-4.1.5.1-18.el7.x86_64 : Utilities for managing accounts and shadow password filesRepo        : baseMatched from:Filename    : /usr/share/man/man8/useradd.8.gzWhich is already installed.# yum install shadow-utilsLoaded plugins: fastestmirror, ovlLoading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * extras: centos.mbni.med.umich.edu * updates: centos.netnitco.netPackage 2:shadow-utils-4.1.5.1-18.el7.x86_64 already installed and latest versionNothing to doAnd, in fact, the binaries (e.g. /usr/sbin/useradd) are there. But not the man pages.# ls -l /usr/share/man/man8/useradd.8.gzls: cannot access /usr/share/man/man8/useradd.8.gz: No such file or directorySo my questions are:Why can't I find any of the man pages that are supposed to be in the shadow-utils RPM, when I can find the binaries?Why doesn't (successfully) installing the man-pages RPM install the files that are supposed to be in that RPM?Update: Per Aaron Marasco's answer and msuchy's comment, I tried yum reinstall shadow-utils. As with yum install man-pages, this appears to complete successfully, but doesn't actually put any files in /usr/share/man/.
Can't install man pages on minimal Centos Docker container
centos;rpm;man;docker
Your image probably has the nodocs transaction flag set in the yum configuration (cf. /etc/yum.conf).You can remove it globally (or at the yum command line) before (re-)installing the packages you want the man pages for.For example:yum --setopt=tsflags='' reinstall shadow-utils