On Sat, Apr 19, 2025 at 04:09:53PM +0200, Chris Hofstaedtler wrote:
* Michael Stone <mst...@debian.org> [250419 15:47]:
If the goal is a minimal container image, why use debian at all vs a
distribution optimized for that purpose? Running alpine without perl
is already a solved problem...
This is true for a lot of things Debian is used for. As an example:
GNOME desktop users could also use Fedora, and the work of
maintaining GNOME in Debian would be saved.
No, that's not the same at all. Debian is a general purpose OS that can
form the foundation for a lot of variants. But, that flexibility has a
cost, and the cost is size & complexity. /var/lib/apt and /var/lib/dpkg
alone are the size of a minimal linux distribution, without even
accounting for actual executables. You can shrink the minimal set by
making some components replaceable, but for a general purpose OS that
implies the 60k update-alternatives program plus /etc/alternatives plus
/var/lib/dpkg/alternatives--all to support reconfiguration that won't
ever happen in a container image. If size alone is the driving
requirement, a general purpose OS like Debian (or Fedora, etc.) isn't
the right starting point.
You *can* build a really small container based on debian by starting
with udebs and ditching package management/interactive
configuration/etc. (Or, many debian container guides advocate a generous
use of rm -rf to get rid of a lot of that stuff after the fact.)
But in that context I don't see the relevance in talking about trimming
stuff from a normal debian base install because the target isn't a
normal debian base install.