36

I am trying to select a recommended base Linux distribution for my company's container images.

I have narrowed it down to Debian and Debian-Slim.

Everything I read says that Debian-Slim is just a pared down distribution. But I can't seem to find hard details on how they differ.

What capabilities are in Debian that are not in Debian-Slim?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Vaccano
  • 78,325
  • 149
  • 468
  • 850

1 Answers1

33

You can compare the git repos used to build the images (rootfs.manifest is useful). Or you can run each image and see what they show is different:

$ docker run --rm debian:stable dpkg --get-selections >debian-stable-pkgs.txt

$ docker run --rm debian:stable-slim dpkg --get-selections >debian-stable-slim-pkgs.txt

$ diff debian-stable-pkgs.txt debian-stable-slim-pkgs.txt
23,24d22
< iproute2                                      install
< iputils-ping                                  install
35,36d32
< libcap2:amd64                                 install
< libcap2-bin                                   install
40d35
< libelf1:amd64                                 install
53d47
< libmnl0:amd64                                 install
77d70
< libxtables12:amd64                            install

Additionally, as Tomofumi points out, there are various files excluded from the image (with some others reincluded). These are mostly documentation and language support:

/usr/share/doc/*
/usr/share/info/*
/usr/share/linda/*
/usr/share/lintian/overrides/*
/usr/share/locale/*
/usr/share/man/*
/usr/share/doc/kde/HTML/*/*
/usr/share/gnome/help/*/*
/usr/share/locale/*
/usr/share/omf/*/*-*.emf

So by excluding a handful of packages, and stripping various docs and localization files, they were able to trim 45MB from the image, or about 40%.

$ docker image ls debian
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
debian              stable-slim         eb8569e750e6        2 weeks ago         69.2MB
debian              stable              405289501bdf        2 weeks ago         114MB
BMitch
  • 231,797
  • 42
  • 475
  • 450
  • Huh. So those seven module are all that is missing from Debian-Slim. Add them back in and you have Debian again? If so, that clears it up quite well for me. – Vaccano Jan 17 '20 at 21:46
  • 13
    There are more files will be removed during the build script debuerreotype-slimify, the list of removed files is here: https://github.com/debuerreotype/debuerreotype/blob/master/scripts/.slimify-excludes – Tomofumi Apr 02 '20 at 07:13