我正在尝试为我公司的容器映像选择一个推荐的基本Linux发行版。
我把范围缩小到Debian和Debian。
我读到的每一篇文章都说Debian只是一个成对的向下发行版。但我似乎找不到关于它们有何不同的具体细节。
在Debian中哪些功能不在Debian?中?
发布于 2020-01-17 21:37:35
您可以比较用于构建图像的git repos (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此外,作为富泉指出,还有来自图像的各种不包括文件 (与其他一些重新列入)。这些主要是文件和语言支持:
/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因此,通过排除少数几个包,并剥离各种文档和本地化文件,它们能够从图像中减少45 of,即大约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 114MBhttps://stackoverflow.com/questions/59794891
复制相似问题