Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"man docker" displays "This system has been minimized" permanently on non-minimal Ubuntu desktop #639

Closed
1 of 3 tasks
krichter722 opened this issue Apr 1, 2019 · 19 comments · Fixed by docker/docker-ce-packaging#350

Comments

@krichter722
Copy link

krichter722 commented Apr 1, 2019

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

man docker should display the Docker manpage.

Actual behavior

> man docker
This  system  has been minimized by removing packages and content
that are not required on a system that users do not log into.

To restore this content, including manpages, you can run the ’un‐
minimize’  command.  You  will  still need to ensure the ’man‐db’
package is installed.

There's no such command on Ubuntu desktop systems afaik. All other manpages are working as expected.

Steps to reproduce the behavior

Invoke man docker on Ubuntu 18.10 after installing it following the installation guide on the website.

Output of docker version:

Client:
 Version:           18.09.4
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        d14af54266
 Built:             Wed Mar 27 18:35:52 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.4
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       d14af54
  Built:            Wed Mar 27 18:01:48 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

Containers: 2
 Running: 0
 Paused: 0
 Stopped: 2
Images: 561
Server Version: 18.09.4
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.18.0-16-generic
Operating System: Ubuntu 18.10
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.52GiB
Name: richter-Lenovo-IdeaPad-Z500
ID: 4N25:7BI5:A5XO:5OX3:IION:6FPQ:IRWZ:SIVS:FSUF:SKCQ:JGXU:OGUV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: krichter
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.)
./.

@thaJeztah
Copy link
Member

This is because of the new "minimal" versions of Ubuntu; https://wiki.ubuntu.com/Minimal (also see tianon/docker-brew-ubuntu-core#122 (comment)). On those versions, the unminimize command should be available to convert to a "full" version, but the command seems to be missing in some cases (not sure where in which package to find the command though)

FWIW; I can reproduce this on DigitalOcean Ubuntu 18.10 (18.04 does not have the issue); on those instances the unminimize command is also missing

@pablitok
Copy link

Same issue here after upgrading from 18.10 to 19.04, desktop version, so I guess must be something else

@kolyshkin
Copy link

Looks like this needs to be reported to Ubuntu not Docker -- our packages do not treat man pages as something special.

@tomjakubowski
Copy link

I don't think that this is an Ubuntu problem. The man pages in the .deb that I've downloaded from the Docker repository contain that text:

tom@tjakubowski-sc:/tmp
% cat /etc/issue
Ubuntu 18.10 \n \l

tom@tjakubowski-sc:/tmp
% uname -a  
Linux tjakubowski-sc 4.18.0-20-generic #21-Ubuntu SMP Mon May 6 18:45:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
tom@tjakubowski-sc:/tmp
% apt download docker-ce-cli                                              
Get:1 https://download.docker.com/linux/ubuntu cosmic/stable amd64 docker-ce-cli amd64 5:18.09.6~3-0~ubuntu-cosmic [13.0 MB]
Fetched 13.0 MB in 0s (43.0 MB/s)      
tom@tjakubowski-sc:/tmp
% dpkg -x docker-ce-cli_5%3a18.09.6\~3-0\~ubuntu-cosmic_amd64.deb /tmp/dcc
% zcat /tmp/dcc/usr/share/man/man1/docker.1.gz 
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, including manpages, you can run the 'unminimize'
command. You will still need to ensure the 'man-db' package is installed.

@rgson
Copy link

rgson commented Jun 7, 2019

Same issue. Installed docker-ce-cli from the disco test repo on a fresh desktop install of Ubuntu disco

Distributor ID:	Ubuntu
Description:	Ubuntu 19.04
Release:	19.04
Codename:	disco
/tmp/tmp.M8PUqY6Qvs > apt download docker-ce-cli
Get:1 https://download.docker.com/linux/ubuntu disco/test amd64 docker-ce-cli amd64 5:19.03.0~2.2.rc2-0~ubuntu-disco [41.8 MB]
Fetched 41.8 MB in 2s (17.7 MB/s)

/tmp/tmp.M8PUqY6Qvs > dpkg -x docker-ce-cli_5%3a19.03.0\~2.2.rc2-0\~ubuntu-disco_amd64.deb .

/tmp/tmp.M8PUqY6Qvs > zcat usr/share/man/man1/docker.1.gz
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, including manpages, you can run the 'unminimize'
command. You will still need to ensure the 'man-db' package is installed.

@Alives
Copy link

Alives commented Jun 16, 2019

Not only that but the man output is misleading, since 'unminimize' wraps in the man output to 'un-minimize'. Neither command exists:

% dpkg -L docker-ce-cli | grep minimize | wc -l
0

@thaJeztah
Copy link
Member

thaJeztah commented Jun 16, 2019 via email

@rgson
Copy link

rgson commented Jun 16, 2019

The minimized Ubuntu images' handling of man pages seems to be a two-step process:

  1. Some dpkg exclusion rules are set up to avoid installing manual pages.
  2. The man binary is replaced by a simple shell script that outputs the previously posted text.

As such, at no point are the packages' actual man pages altered.

Furthermore, the unminimize script will simply remove the dpkg exclusion rules, remove the fake man binary and reinstall any affected packages. As such, that script would be insufficient to recover the Docker man pages.

My guess is that some part of the Docker packaging pipeline (or one of its dependencies) uses the man binary when putting together the man pages. The package is presumably build on a minimized version of Ubuntu containing the fake man binary, which is causing the actual man page's content to be replaced by this message.

@thaJeztah
Copy link
Member

My guess is that some part of the Docker packaging pipeline (or one of its dependencies) uses the man binary when putting together the man pages

Interesting thought, definitely possible somehow. FWIW, to check, I just tried building the manpages (make manpages) in an Ubuntu 19.04 container (which is "minimized"), and generating the manpages seems to work ok, so it might be something in the packaging repo; https://github.com/docker/docker-ce-packaging

@thaJeztah
Copy link
Member

thaJeztah commented Jun 17, 2019

Likely suspect is dh_installman;

...
make[1]: Leaving directory '/root/build-deb'
   dh_installdocs
   dh_installchangelogs
   dh_installman
   dh_bash-completion
   dh_systemd_enable
   debian/rules override_dh_installinit
...

Which appears to do a "re-encode to utf8", and (at a glance) looks to be using man; https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

	if (@manpages_to_reencode) {
		on_items_in_parallel(\@manpages_to_reencode, sub {
			for my $manpage (@_) {
				my $manpage_tmp = "${manpage}.dh-new";
				my $manpage_cmd = ($manpage =~ m{^/}) ? $manpage : "./${manpage}";
				doit({ stdout => $manpage_tmp }, 'man', '-l', '--recode', 'UTF-8', $manpage_cmd);
				# recode uncompresses compressed pages
				my $orig = $manpage;
				rm_files($orig) if $manpage =~ s/\.(gz|Z)$//;
				rename_path($manpage_tmp, $manpage);
			}
			# Bulk reset permissions of all re-encoded files
			xargs(\@_, 'chmod', '0644', '--');
		});
	}
} else {
	# Should only occur during debhelper building itself (to avoid a B-D on man-db).
	warning("man is not available.  Skipping re-encode of UTF-8 manpages")
}

thaJeztah added a commit to thaJeztah/docker-ce-packaging that referenced this issue Jun 17, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before running `dh_installman` to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member

Opened docker/docker-ce-packaging#343 to fix this (tested it manually, and looks to do the job)

@rgson
Copy link

rgson commented Jun 17, 2019

Nice! Good catch. This seems to be an Ubuntu issue then. Your PR seems like a decent workaround (in my opinion) until they sorts it out upstream.

I have filed a bug report against Ubuntu's version of the debhelper package: https://bugs.launchpad.net/ubuntu/+source/debhelper/+bug/1833124. It was the most appropriate place I could think of.

@thaJeztah
Copy link
Member

Thanks for creating that issue 👍

@jglick
Copy link

jglick commented Jun 20, 2019

The unminimize command is something that ubuntu ships

$ unminimize
unminimize: command not found

Anyone happen to know where this is?

@rgson
Copy link

rgson commented Jun 21, 2019

@jglick It is not packaged, afaik. It seems to be locally ("manually") installed on the Minimal Ubuntu images.

@thaJeztah
Copy link
Member

@jglick does man <some other command> also show the "minimized" message? If not, then it's possible you're seeing the "minimized" message due to the packaging bug (docker/docker-ce-packaging#343 / https://bugs.launchpad.net/ubuntu/+source/debhelper/+bug/1833124), and your system is not actually a minimal install (thus the unminimize script would not be available).

Possibly would make sense for Ubuntu to ship that script for the "non-minimized" installs as well (but print a "this system is already unminimized" message, e.g., instead)

thaJeztah added a commit to thaJeztah/docker-ce-packaging that referenced this issue Jun 25, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before running `dh_installman` to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker-ce-packaging that referenced this issue Jun 25, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker-ce-packaging that referenced this issue Jun 25, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker-ce-packaging that referenced this issue Jun 25, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this issue Jun 28, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e52fa49
Component: packaging
kolyshkin pushed a commit to kolyshkin/docker-ce-packaging that referenced this issue Jul 2, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e52fa49)
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this issue Jul 6, 2019
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

https://github.com/Debian/debhelper/blob/8523120dccaf5666425109da228b7e1778f15e8b/dh_installman#L298-L316

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e52fa49)
Upstream-commit: 8007c3ea8df04d642addf9bb786ea47f27d28103
Component: packaging
@nroose
Copy link

nroose commented Jul 14, 2020

Seems bad that I can't even get man pages to work by installing them!? I don't want to unminimize, I just want man pages.

@thaJeztah
Copy link
Member

What version of docker do you have installed? This issue should be fixed by docker/docker-ce-packaging#358 (and used for the current 19.03.x packages)

@thaJeztah
Copy link
Member

Let me close this ticket for now, as it looks like it went stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants