To date, we've shaved the Bionic (18.04 LTS) minimal images down by over 53%, since Ubuntu 14.04 LTS, and trimmed nearly 100 packages and thousands of files.
- Feedback welcome here: https://ubu.one/imgSurvey
This is particularly useful for container images (Docker, LXD, Kubernetes, etc.), embedded device environments, and anywhere a developer wants to bootstrap an Ubuntu system from the smallest possible starting point. Smaller images generally:
- are subject to fewer security vulnerabilities and subsequent updates
- reduce overall network bandwidth consumption
- and require less on disk storage
First, a definition...
"The Ubuntu Minimal Image is the smallest base upon which a user can apt install any package in the Ubuntu archive."
By design, Ubuntu Minimal Images specifically lack the creature comforts, user interfaces and user design experience that have come to define the Ubuntu Desktop and Ubuntu Cloud images.
To date, we've shaved the Bionic (18.04 LTS) minimal images down by over 53%, since Ubuntu 14.04 LTS, and trimmed nearly 100 packages and thousands of files.
-->
Release | Bytes (compressed) | Bytes (uncompressed) | Files | Directories | Links | Packages |
| ls -alF | du -sb . | find . -type f | wc -l | find . -type d | wc -l | find . -type l | wc -l | sudo chroot . dpkg -l | grep -c ^i |
14.04 LTS base | 65,828,262 | 188,406,508 | 9,953 | 1,306 | 1,496 | 189 |
16.04 LTS base | 48,296,930 | 120,370,143 | 5,655 | 751 | 1,531 | 103 |
18.04 LTS base | 31,089,259 | 81,270,020 | 2,589 | 596 | 190 | 95 |
As of today, the Bionic (18.04 LTS) minimal image weighs in at 30MB (compressed), and 81MB (uncompressed on disk), and is comprised of 100 Debian packages.
We've removed things like locales and languages, which are easy to add back, but are less necessary in scale-out, container working environments. We've also removed other human-focused resources, like
documentation,
manpages, and
changelogs, which are more easily read online (and also easy to re-enable). This base filesystem tarball also lacks a kernel and an init system, as it's intended to be used inside of a chroot or application container. Note that Canonical's Ubuntu Kernel team has also made tremendous strides tuning and minimizing Linux into various optimized kernel flavors.
Here are a few resources:
- Download the image:
- Review the package manifest:
- Review the file and directory structure:
- Launch a minimal Docker image:
- $ docker run -it ubuntu:bionic
I can still see another 1.2MB of savings to harvest in /usr/share/doc, /usr/share/info, and /usr/share/man, and the Foundations team is already looking into filtering out that documentation, too.
Do you see any other opportunities for savings? Can you help us crop the Bionic (18.04 LTS) images any further? Is there something that we've culled, that you see as problematic? We're interested in your feedback at the form here:
Cheers,
Dustin
No comments:
Post a Comment
Please do not use blog comments for support requests! Blog comments do not scale well to this effect.
Instead, please use Launchpad for Bugs and StackExchange for Questions.
* bugs.launchpad.net
* stackexchange.com
Thanks,
:-Dustin