Canonical Finally Discovers "--no-install-recommends" Is Worthwhile For Docker

Written by Michael Larabel in Ubuntu on 15 November 2019 at 07:15 AM EST. 26 Comments
UBUNTU
Debian's APT package manager has supported the --no-install-recommends for years so only the main dependencies are installed and not the "recommended" packages. Seemingly it's taken Canonical until now to figure out how practical that option is for reducing the size of their Docker containers.

In an official Ubuntu.com blog post they announced their Ubuntu Docker images were reduced by 60% via the use of using the --no-install-recommends option within their Docker files. The option has been in APT and just a matter of making use of that option as opposed to announcing a new development or capability.

Obviously avoiding recommended packages can hit some corner cases especially on a more well-rounded desktop or server, but for Docker/containers, they've found it works well with all their Docker-based web projects running at Canonical.

Canonical decreased their Docker image size by about 60% while speeding up the build time by about 15%. So treat this as a P.S.A. if you haven't toyed with "--no-install-recommends or the other APT options in a while.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week