Today I noticed a new message when I login to my Ubuntu 18.04 docker container.
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, you can run the 'unminimize' command.
This is however a container that I log into from time to time.
IMHO it is not a very sound strategy to change systems without user consent in this way but that leaving that aside for the moment, how I can prevent Ubuntu from minimizing my systems?
The minimization breaks functionality of my container and the unminimize command ends with an kernel error.
2 Answers
Answering, because I don't have reputation to comment.
Although you can't technically prevent your Docker-based installation of Ubuntu from being minimized (because the Docker image comes that way when you pull it), you can definitely undo it: add an invocation of
yes | unminimizeto your Dockerfile. The "unminimize" command (/usr/local/sbin/unminimize) undoes the minimization process; because it's interactive, and asks a number of "y/n" questions, we use the "yes" command, which continually prints the string "y" until killed.
It's not that Canonical changed the image without users' consent.
What you get is the prepackaged ubuntu-minimal which is used by most cloud hosting providers and containers like Docker.
You can read more about what is Minimal Ubuntu.
Quote for context:
Minimal Ubuntu is a set of Ubuntu images designed for automated deployment at scale and made available across a range of cloud substrates. They use the optimised kernels and optimised boot process on their target compute substrate. These images have a greatly reduced default package set, without many convenience tools for interactive usage. They are much smaller, boot faster, and will require fewer security updates over time since they have fewer packages installed.
To answer your question - you have more than one choice:
- Use something other than ubuntu-minimal as a base image
- Customize the image to include the packages you need