Debian 与 Debian-Slim 有何不同?

How does Debian differ from Debian-Slim?

我正在尝试 select 我公司容器镜像的推荐基础 Linux 发行版。

我已将范围缩小到 Debian 和 Debian-Slim。

我读到的所有内容都说 Debian-Slim 只是一个配对的发行版。但我似乎找不到关于它们有何不同的具体细节。

Debian 有哪些 Debian-Slim 没有的功能?

你可以对比一下git repos used to build the images(rootfs.manifest很有用)。或者您可以 运行 每张图片并查看它们显示的内容不同:

$ 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

此外,如 , there are various files excluded from the image (with some others reincluded)。这些主要是文档和语言支持:

/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

因此,通过排除少数软件包并剥离各种文档和本地化文件,他们能够从图像中 trim 45MB,或大约 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