Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Debian differ from Debian-Slim?

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 paired 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?

like image 654
Vaccano Avatar asked Jan 17 '20 21:01

Vaccano


People also ask

Is Alpine smaller than Debian?

The base image size of Alpine Linux is only 2.67MB, which is ten times smaller than the most popular Linux distributions, Ubuntu and Debian.

What is a slim image?

The slim image is a paired down version of the full image. This image generally only installs the minimal packages needed to run your particular tool. In the case of python, that's the minimum packages to run python and the same for node. js. By leaving out lesser-used tools, the image is smaller.

What is Docker Debian?

Docker is a solution for the management of lightweight process containers. Docker can be installed from buster (or newer) repositories (see the docker.io package). Docker upstream also provides packages (for multiple different debian version): https://docs.docker.com/install/linux/docker-ce/debian/

What is Docker slim?

7 minute read Updated: July 25, 2022. Sooter Saalu. Docker is an open containerization platform for developing, shipping, and running applications. It enables you to package your applications in isolated environments, called containers, where they can run independently from infrastructure.


1 Answers

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
like image 134
BMitch Avatar answered Sep 25 '22 20:09

BMitch