Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Alpine base rootfs is just a few megabytes, while Arch is like 100-200MB. I usually encounter Alpine in Docker containers when people want to wrap just one specific service and have save space on things that are not essential for it (it would be wasteful to ship your 20MB app in a 200MB Arch/Debian container).

I didn't know Alpine was useful as a working machine though.



A Debian Slim Docker image is 20MiB, and in my experience by the time you install all the dependencies of your app in an Alpine image, it’s bigger than the equivalent based on Debian Slim.


> A Debian Slim Docker image is 20MiB, and in my experience by the time you install all the dependencies of your app in an Alpine image, it’s bigger than the equivalent based on Debian Slim.

This is true, also while Alpine is an excellent base image, some people have run into troubles with musl/busybox and prefer to use Debian/Ubuntu or whatever else they're familiar with as their container base.

Then again, I kind of went in the opposite direction and use Ubuntu as the base for all of my container images and install software "the normal way": for example, getting OpenJDK through apt as I would on a server with Ansible, or for my local dev machine, without any of the fanciful optimizations or clever hacks to keep the file sizes down.

The downside of this is that my base images are multiple hundreds of MB in size (even after cleaning apt cache in the same step as doing the install, to avoid adding that to the layers), but on the bright side that hardly matters because I use the same base images for all of my containers so only the changes for that particular image need to be transferred through the network and like 40-80% of the layers remain consistent: https://blog.kronis.dev/articles/using-ubuntu-as-the-base-fo...

It's not "optimal" from a size perspective, but it's delightfully simple and approachable.


Arch latest docker image is 135MB[0], whereas Debian stable-slim is 30MB[1]

[0]https://hub.docker.com/_/archlinux/tags

[1]https://hub.docker.com/layers/library/debian/stable-slim/ima...


It works fine on older machines. setup-xorg after the installing process, add a light WM such as wmaker or jwm for parent commenter's pentium II and he/she is done.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: