Docker â debian:stretch-slim â install man and view manpages
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
When using the debian:stretch
Docker image, the /usr/share/man/
directory already contains many manpages, and man
can be easily installed to view them:
$ apt-get update
$ apt-get install man
$ man ls
$ man cp
However, when using the debian:stretch-slim
Docker image, the /usr/share/man/
directory is intentionally empty:
These tags are an experiment in providing a slimmer base (removing some extra files that are normally not necessary within containers, such as man pages and documentation)
How do I populate the /usr/share/man/
directory, so I can use man
to view manpages for core utilities (such as cat
, chmod
, chown
, cp
, ls
, mkdir
, mv
, rm
, tail
, etc) ?
debian docker man
add a comment |Â
up vote
0
down vote
favorite
When using the debian:stretch
Docker image, the /usr/share/man/
directory already contains many manpages, and man
can be easily installed to view them:
$ apt-get update
$ apt-get install man
$ man ls
$ man cp
However, when using the debian:stretch-slim
Docker image, the /usr/share/man/
directory is intentionally empty:
These tags are an experiment in providing a slimmer base (removing some extra files that are normally not necessary within containers, such as man pages and documentation)
How do I populate the /usr/share/man/
directory, so I can use man
to view manpages for core utilities (such as cat
, chmod
, chown
, cp
, ls
, mkdir
, mv
, rm
, tail
, etc) ?
debian docker man
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When using the debian:stretch
Docker image, the /usr/share/man/
directory already contains many manpages, and man
can be easily installed to view them:
$ apt-get update
$ apt-get install man
$ man ls
$ man cp
However, when using the debian:stretch-slim
Docker image, the /usr/share/man/
directory is intentionally empty:
These tags are an experiment in providing a slimmer base (removing some extra files that are normally not necessary within containers, such as man pages and documentation)
How do I populate the /usr/share/man/
directory, so I can use man
to view manpages for core utilities (such as cat
, chmod
, chown
, cp
, ls
, mkdir
, mv
, rm
, tail
, etc) ?
debian docker man
When using the debian:stretch
Docker image, the /usr/share/man/
directory already contains many manpages, and man
can be easily installed to view them:
$ apt-get update
$ apt-get install man
$ man ls
$ man cp
However, when using the debian:stretch-slim
Docker image, the /usr/share/man/
directory is intentionally empty:
These tags are an experiment in providing a slimmer base (removing some extra files that are normally not necessary within containers, such as man pages and documentation)
How do I populate the /usr/share/man/
directory, so I can use man
to view manpages for core utilities (such as cat
, chmod
, chown
, cp
, ls
, mkdir
, mv
, rm
, tail
, etc) ?
debian docker man
debian docker man
asked 54 mins ago
TachyonVortex
19316
19316
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
The coreutils
package populates the /usr/share/man/man1/
directory with manpages for core utilities.
However, simply running apt-get update
and apt-get install coreutils
is not sufficient, because dpkg
has been configured to exclude /usr/share/man/*
, using path-exclude
in /etc/dpkg/dpkg.cfg.d/docker
(see here and here).
So the first step is to remove that line from the /etc/dpkg/dpkg.cfg.d/docker
file. One way to do this is by using sed
:
$ sed -i '/path-exclude /usr/share/man/d' /etc/dpkg/dpkg.cfg.d/docker
dpkg
has also been configured to exclude /usr/share/groff/*
, and this needs to be undone too (since groff
is required in order to render manpages):
$ sed -i '/path-exclude /usr/share/groff/d' /etc/dpkg/dpkg.cfg.d/docker
Now the /usr/share/man/man1/
directory needs to be populated from the coreutils
package. Since coreutils
is already installed in the debian:stretch-slim
Docker image, it needs to be reinstalled:
$ apt-get update
$ apt-get install --reinstall coreutils
Finally, man
can be installed and manpages can be viewed:
$ apt-get install man
$ man ls
$ man cp
It's also helpful to install less
, which man
will use for paginating the manpages, and provides a better experience than the default more
paginator:
$ apt-get install less
Related questions:
- Remove documentation to save hard drive space
- Installing packages without docs
- Reinstall man pages & fix man
- How can I restore the man page for ls (/usr/share/man/man1/ls.1.gz)?
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The coreutils
package populates the /usr/share/man/man1/
directory with manpages for core utilities.
However, simply running apt-get update
and apt-get install coreutils
is not sufficient, because dpkg
has been configured to exclude /usr/share/man/*
, using path-exclude
in /etc/dpkg/dpkg.cfg.d/docker
(see here and here).
So the first step is to remove that line from the /etc/dpkg/dpkg.cfg.d/docker
file. One way to do this is by using sed
:
$ sed -i '/path-exclude /usr/share/man/d' /etc/dpkg/dpkg.cfg.d/docker
dpkg
has also been configured to exclude /usr/share/groff/*
, and this needs to be undone too (since groff
is required in order to render manpages):
$ sed -i '/path-exclude /usr/share/groff/d' /etc/dpkg/dpkg.cfg.d/docker
Now the /usr/share/man/man1/
directory needs to be populated from the coreutils
package. Since coreutils
is already installed in the debian:stretch-slim
Docker image, it needs to be reinstalled:
$ apt-get update
$ apt-get install --reinstall coreutils
Finally, man
can be installed and manpages can be viewed:
$ apt-get install man
$ man ls
$ man cp
It's also helpful to install less
, which man
will use for paginating the manpages, and provides a better experience than the default more
paginator:
$ apt-get install less
Related questions:
- Remove documentation to save hard drive space
- Installing packages without docs
- Reinstall man pages & fix man
- How can I restore the man page for ls (/usr/share/man/man1/ls.1.gz)?
add a comment |Â
up vote
0
down vote
The coreutils
package populates the /usr/share/man/man1/
directory with manpages for core utilities.
However, simply running apt-get update
and apt-get install coreutils
is not sufficient, because dpkg
has been configured to exclude /usr/share/man/*
, using path-exclude
in /etc/dpkg/dpkg.cfg.d/docker
(see here and here).
So the first step is to remove that line from the /etc/dpkg/dpkg.cfg.d/docker
file. One way to do this is by using sed
:
$ sed -i '/path-exclude /usr/share/man/d' /etc/dpkg/dpkg.cfg.d/docker
dpkg
has also been configured to exclude /usr/share/groff/*
, and this needs to be undone too (since groff
is required in order to render manpages):
$ sed -i '/path-exclude /usr/share/groff/d' /etc/dpkg/dpkg.cfg.d/docker
Now the /usr/share/man/man1/
directory needs to be populated from the coreutils
package. Since coreutils
is already installed in the debian:stretch-slim
Docker image, it needs to be reinstalled:
$ apt-get update
$ apt-get install --reinstall coreutils
Finally, man
can be installed and manpages can be viewed:
$ apt-get install man
$ man ls
$ man cp
It's also helpful to install less
, which man
will use for paginating the manpages, and provides a better experience than the default more
paginator:
$ apt-get install less
Related questions:
- Remove documentation to save hard drive space
- Installing packages without docs
- Reinstall man pages & fix man
- How can I restore the man page for ls (/usr/share/man/man1/ls.1.gz)?
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The coreutils
package populates the /usr/share/man/man1/
directory with manpages for core utilities.
However, simply running apt-get update
and apt-get install coreutils
is not sufficient, because dpkg
has been configured to exclude /usr/share/man/*
, using path-exclude
in /etc/dpkg/dpkg.cfg.d/docker
(see here and here).
So the first step is to remove that line from the /etc/dpkg/dpkg.cfg.d/docker
file. One way to do this is by using sed
:
$ sed -i '/path-exclude /usr/share/man/d' /etc/dpkg/dpkg.cfg.d/docker
dpkg
has also been configured to exclude /usr/share/groff/*
, and this needs to be undone too (since groff
is required in order to render manpages):
$ sed -i '/path-exclude /usr/share/groff/d' /etc/dpkg/dpkg.cfg.d/docker
Now the /usr/share/man/man1/
directory needs to be populated from the coreutils
package. Since coreutils
is already installed in the debian:stretch-slim
Docker image, it needs to be reinstalled:
$ apt-get update
$ apt-get install --reinstall coreutils
Finally, man
can be installed and manpages can be viewed:
$ apt-get install man
$ man ls
$ man cp
It's also helpful to install less
, which man
will use for paginating the manpages, and provides a better experience than the default more
paginator:
$ apt-get install less
Related questions:
- Remove documentation to save hard drive space
- Installing packages without docs
- Reinstall man pages & fix man
- How can I restore the man page for ls (/usr/share/man/man1/ls.1.gz)?
The coreutils
package populates the /usr/share/man/man1/
directory with manpages for core utilities.
However, simply running apt-get update
and apt-get install coreutils
is not sufficient, because dpkg
has been configured to exclude /usr/share/man/*
, using path-exclude
in /etc/dpkg/dpkg.cfg.d/docker
(see here and here).
So the first step is to remove that line from the /etc/dpkg/dpkg.cfg.d/docker
file. One way to do this is by using sed
:
$ sed -i '/path-exclude /usr/share/man/d' /etc/dpkg/dpkg.cfg.d/docker
dpkg
has also been configured to exclude /usr/share/groff/*
, and this needs to be undone too (since groff
is required in order to render manpages):
$ sed -i '/path-exclude /usr/share/groff/d' /etc/dpkg/dpkg.cfg.d/docker
Now the /usr/share/man/man1/
directory needs to be populated from the coreutils
package. Since coreutils
is already installed in the debian:stretch-slim
Docker image, it needs to be reinstalled:
$ apt-get update
$ apt-get install --reinstall coreutils
Finally, man
can be installed and manpages can be viewed:
$ apt-get install man
$ man ls
$ man cp
It's also helpful to install less
, which man
will use for paginating the manpages, and provides a better experience than the default more
paginator:
$ apt-get install less
Related questions:
- Remove documentation to save hard drive space
- Installing packages without docs
- Reinstall man pages & fix man
- How can I restore the man page for ls (/usr/share/man/man1/ls.1.gz)?
answered 54 mins ago
TachyonVortex
19316
19316
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480459%2fdocker-debianstretch-slim-install-man-and-view-manpages%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password