-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debian-slim as Alpine alternative concerning disk footprint #1614
Comments
As previously discussed: I think the C library of the VM is irrelevant to performance, as each container will have its own libc in the image.
That the lima-adapted version of the image is larger than the original, is mostly because it bundles some required packages. For the debian and ubuntu images, those packages are downloaded during installation and installed. |
One finding is that we could save some extra disk space, going from "generic" to "genericcloud" (virtual only) That way, we don't have to include drivers for physical hardware, but only for virtual hardware (like alpine virt) https://cloud.debian.org/images/cloud/
318M
246M (-22.6%) EDIT: Haven't tried running the Docker "slim" on it:
https://github.com/debuerreotype/debuerreotype I think it is mostly about removing documentation.
|
Most of the extra runtime disk usage actually comes from the apt lists, and not from the deb packages:
|
One difference between ubuntu and debian, would be the older kernel being used. This has pros and cons. ubuntu: 6.2.0 debian: 5.10.0 That is, there might be some bugs in the latest and greatest - similar to using "ubuntu" vs using "ubuntu-lts" |
Thank you very much, Anders! |
Description
Since SSD space is often an issue on macs but Alpine uses a different c library, which can result in poor perforce when running a python (https://pythonspeed.com/articles/alpine-docker-python/).
Therefore, I would recommend supporting Debian-slim as small alternative as template for a VM with less disk footprint. . With Debian-slim the footprint is ca. 82 MB + kernel resources, which is larger than Alpine but still okay. Maybe Ubuntu minimal is another option here, but Debian-slim is smaller.
Sadly, Debian-slim is not available as official image. Debian cloud images (qcow2) It is only available inside a container registry/repository as with Docker. For managing that there is actually a repository
https://github.com/debuerreotype/docker-debian-artifacts/blob/4648ad5c6feb1318b8a6c31502ebde8bb18ebb5e/bullseye/slim/
Of course I could use that as containers inside a VM that has containerd + nerdctl, but often for development purposes three or four different small VMs (one with python, one with node, etc.) is all that is needed for different projects, which are only running when I'm actually working on them. Even with 4 Debian-slim VMs in lima it would be way less disk space than having a full flavored Ubuntu-VM with 4 containers in it ( > 900MB), let alone running an additional layer of abstraction.
In that fashion I did this with multiple alpine VMs, but ran across those python performance issues.
Best
P.R.
The text was updated successfully, but these errors were encountered: