From the Canyon Edge -- :-Dustin

Friday, February 2, 2018

RFC: Ubuntu 18.04 LTS Minimal 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.
  • Feedback welcome here: https://ubu.one/imgSurvey
In last year's AskHN HackerNews post, "Ask HN: What do you want to see in Ubuntu 17.10?", and the subsequent treatment of the data, we noticed a recurring request for "lighter, smaller, more minimal" Ubuntu images.

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.

-->
ReleaseBytes (compressed)Bytes (uncompressed)FilesDirectoriesLinksPackages
ls -alFdu -sb .find . -type f | wc -lfind . -type d | wc -lfind . -type l | wc -lsudo chroot . dpkg -l | grep -c ^i
14.04 LTS base65,828,262188,406,5089,9531,3061,496189
16.04 LTS base48,296,930120,370,1435,6557511,531103
18.04 LTS base31,089,25981,270,0202,58959619095



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.

We've just released Bionic's Alpha 2, in our development cycle toward an April 26, 2018 release date of Ubuntu 18.04 LTS -- our 7th Ubuntu LTS.

At this point, we're soliciting your feedback in this public "RFC" on our progress toward the smallest Ubuntu base image ever!

Here are a few resources:
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

Printfriendly