DEV Community

Moving away from Alpine

Ahmad Syazwan on February 16, 2019

When container movement started getting a lot of traction thanks to docker, there was a real demand for lightweight base image that is optimized fo...
Collapse
 
quinnjr profile image
Joseph Quinn

Just going to provide counter-points:

  • glibc is available for use on Alpine and musl is available for use on Ubuntu. Use of musl does not guarantee that an application will not work on Ubuntu. Musl is meant more for static compilation and doesn't usually rely on the underlying C library using dynamic links. Unless something is using a glibc-specific GNU extension or something that isn't implemented in musl yet, it should be able to compile and run based on musl or glibc.

  • You can pin versions fairly easily when adding them. Eg: apk add python3=3.8.2-r0 pins to version 3.8.2 release 0.

  • Automating unavailable packages can be managed with your own custom APK builds (which you should then submit) or an automated build system. I use a heavily customized Nginx install for my production Docker images and have no issue compiling each release from source.

  • If you really need more out of syslog, use the syslog-ng package.

Collapse
 
tomcooperca profile image
Tom Cooper • Edited

While you can pin package versions, version pinning in Alpine leads to broken builds eventually. They do not keep old versions of any package (even for stable releases) on the repositories. The recommendation is to mirror these repos yourself.

gitlab.alpinelinux.org/alpine/abui...

Collapse
 
daimip profile image
daimip

Can you share a few points on choosing Alpine over Ubuntu? Eg. Alpine more secure than Ubuntu?

Collapse
 
spiritupbro profile image
spiritupbro

smaller than ubuntu to be precise

Collapse
 
ohffs profile image
ohffs

I was watching a video by Bret Fisher on Youtube just the other day comparing the Alpine images to Ubuntu/Debian - it starts from a 'is it more secure?' standpoint but goes into the base container sizes too. Anyway - thought I'd link to it as it popped into my head when I was reading :-)

Collapse
 
twitmyreview profile image
Priyab Dash

I never have used Alpine but Ubuntu and Debian have been my preferred choice since I have worked most on them and the range of packages is more and then there is centos. Though both are heavy on size but I am excited about ubuntu cloud/container version.