Hacker News new | past | comments | ask | show | jobs | submit login

I'm familiar with Alpine in container scenarios, but is there any mileage to using it as a day-to-day desktop distro?



I can't recommend it for desktop use, but it is possible to use it as such.

IMHO it really shines on dedicated, small VMs or for headless SBC use cases.

There's only 5 daemons running after the installation (provider in brackets, the installer asks which one for ssh and ntp): - init (OpenRC) - ssh (dropbear or OpenSSH) - ntp (chrony or busybox) - crond (busybox) - syslog (busybox)

The diskless mode it offers is ideal for SBC's or other use cases with SD-cards or such.

So it's niche seems to be with very lightweight or hardened servers.


I use it on a headless thin client serving as a NAS/ printer server / media box etc. Works very well. Keep in mind that Alpine actually predates containers by many years. It originally started as a light-weight distro targeted at embedded stuff. And the roots are still there. https://heap.ovh/alpine-linux-on-fujitsu-futro-s520s720.html


I use it as my primary OS. You have to do more setup work, there’s much less documentation/help online than more popular distros, and running proprietary software (which usually links to glibc) is probably not worth the effort. This is mostly fine for me, as I don’t do much on my computer aside from code and use a web browser — the only difficulty is most streaming video unfortunately requires Widevine. Given those limitations, I’m very happy with it: it’s very simple and I have a much better understanding of what is installed/running and why.


Yeah, coding (in terminal windows only) and Web browser is what I'm thinking of using it for. I might just have to plunge in and give it a go, thanks! :)


Not really. It's not designed for that. It's designed to be as lightweight as possible.

also, instead of Glibc, it uses musl, which although is supposed to be binary-compatible, does have some gotchas, so the larger the system, with more apps and libraries running on it expecting glibc, will have issues.


musl really becomes a pain if you work a lot with Python. You can't use wheels, which means you will have to compile everything yourself, which sometimes takes ages, and you're not guaranteed that it won't have unnoticeable errors.

My biggest issue was with the 3.12 -> 3.13 transition, when musl got upgraded to 1.2 and with it "musl 1.2 uses new time64-compatible system calls". This broke so many things for me without me knowing, like nginx having as the datetime in the logs the unix epoch. All continued to work, but everything related to timestamps was completely messed up, on 32 bit OS due to running on Raspberry Pis.

This was the moment where I decided to stick to debian-slim, and only very specific containers will continue running on Alpine. Before that it was my default container OS.

Also there is no reliability in packages getting updated, sometimes they just disappear in the next version. But these things are rare occurrences, which only are then nerve wracking when you are confronted with them. For 90% of the cases Alpine is one of the most awesome container OSs.


OpenBSD went through a similar transition, except they didn't even try to maintain ABI compatibility. See https://www.openbsd.org/55.html and https://www.openbsd.org/faq/upgrade55.html, the latter describing the rare "flag day" event. Long term this was good for OpenBSD as it saved a ton of unnecessary cruft and complexity that would have haunted OpenBSD for years if not decades, endlessly taxing developers' time, especially of core developers. And it was an inducement for all developers, those working on OpenBSD (core and ports teams) as well as those targeting OpenBSD, to carefully review code for 64-bit time_t safety. But it necessarily required that the broader community shoulder a large part of the transition burden.

Sometimes it's better to power through with a massive labor effort than to try to use fancy hacks to shield people from latent problems. All things considered, it doesn't sound like the Alpine transition was that bad. But it's the type of thing that most Linux users and developers are not accustomed to, at least those who don't remember the very early years. Ironically, musl libc might not exist if glibc hadn't accumulated so much complexity trying to maintain strong ABI compatibility.

IMO, small prices to pay for free software and Free Software.


There is a lot of affinity between Alpine and OpenBSD. That's a good thing in my book.

I build my entire development stack from source and don't rely on OS packages for it, and I absolutely refuse to use binary compiled Python wheels, so Alpine's lack of them is actually a feature as far as I am concerned. I dealt with the musl quirks.


> You can't use wheels

musl wheel support was added some time ago:

https://github.com/pypa/packaging/releases/tag/21.0

No idea how many packages actually build musl wheels though. From a quick glance at least cryptography and lxml has musl wheels.


Unfortunately, Alpine patched their version of Python in a way that is incompatible with musllinux wheels so we are back to where we started until Alpine Linux 3.16 in 2022[1].

EDIT: I spoke too soon. Apparently, they have decided to amend the patch in a way that is both backwards-compatible and compatible with musllinux wheels[2]. Hopefully, it will roll out soon.

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13227 [2]: https://bugs.python.org/msg406939


The fix has now been pushed to the 3.15 branch.


thanks, I had been scouring the internet for something on this. Didn't expect to come across it on HN


This will be addressed though


This still works for me:

https://github.com/insightfulsystems/alpine-python/blob/5a34...

But I haven’t tested today’s version yet.


Actually, you can run most wheels just fine if you do this: https://github.com/insightfulsystems/alpine-python/blob/5a34...

You just need to know how :)


I did know this, but it wasn't 100% reliable, see https://github.com/grpc/grpc/issues/18150

Regarding the "runs just fine", this is not guaranteed. I certainly do check if it is working, and if it is, and it is a small service or just a containerized tool, then I'll use it. Like using GDAL to perform some reprojections and renderings where a throwaway container is called from a shell script, if it works once, I'll keep using it, but I won't use it to run a Python server which also makes use of Matplotlib and other big dependencies.


It is designed for desktop use, actually. Many of Alpine's developers use it as their primary PC distro :)


I never read anywhere that it was designed for desktop, but they've always included the packages. Firefox was pretty much the only browser available and was unusable for years because of some math issues with font rendering if I remember correctly. ( I have attempted to daily drive it from time to time). In this regards it's pretty obvious Void Linux is more desktop focused.

Alpine is supposed to be a small, stable and secure general purpose base.


I use it on my desktop:) It's a nice experience after a slight learning curve; I'm particularly fond of it supporting ZFS well without being Ubuntu. Musl libc is a potential pain point; I get most software from official repos or build from source, but ex. to run Steam I resorted to flatpak (which just shoves glibc in the container with the application).


For an average user, I'd guess they'd hit more issues with busybox than musl.


If you care, just install the `coreutils` package and it'll overwrite the default symlinks and you'll get GNU coreutils by default.


Oh thanks, that's good to know they're available.


Yep:) If you found that useful, I'd suggest looking over all of https://wiki.alpinelinux.org/wiki/How_to_get_regular_stuff_w...


I hate how many incredibly useful and sane options and most of the time missing from busybox binutils... drivers me crazy.


Are there any (lightweight?) desktop distros built atop Alpine as a base?


I use it as a daily driver. Here is my setup. Coreutils is included.

https://lamda-chops.bearblog.dev/alpine-linux/


I'm using it on my laptop (Thinkpad X270) and it's great.

I don't think there's much credibility to saying it's not "meant to be used" as a desktop; since the packages available suggest to me there's clearly a bunch of people doing just that.

What you can expect is more manual setup (compared to say, OpenBSD, where things work really well out-of-the-box on this hardware). But I took this opportunity to set up an encrypted disk. This is with no "desktop environment", just a window manager and X.

I thought BusyBox would be a pain, but the GNU tools can be automatically installed. Same with musl, which was much less of a big deal than I thought. I can even suggest things feel faster with it, but it does mean staying within packages from the Alpine ecosystem.

I'd be interested if anyone is doing a glibc fork of Alpine (or a way to run the 'full fat' glibc seamlessly, like it does with the GNU tools). Also worth experimenting with Alpine's glibc emulation; I was amazed how good it was, as it runs almost all of a closed-source music production tool that I use.


As long as you're OK with the limitations imposed by using musl, I think it's great on the desktop. I recently switched from Void Linux (glibc variant) and it's working very well. I run proprietary applications like Spotify, Steam, and Discord in Flatpak, and most of the rest from Alpine's repos.

One thing that surprised me is that KDE's software center gives package update notifications for Alpine packages OOTB, and the GUI Just Works(tm) for installing and upgrading.


I use it as a bare metal OS on my blog server and it's great in that scenario too. I've personally found the libc stuff makes it really inconvenient to use as a desktop OS, unfortunately. You have to jump through hoops to get something like VSCode to "just work".


Software like VS code is in direct conflict with the way alpine does things. Alpine on the desktop is certainly not for everyone, but for some use cases it works great.


I am using it as desktop, it does not do things i did not ask for, which i really appreciate. I get away with it easily because i only use xterm and Firefox for the graphical part.


Not as a desktop but I use it on bare metal as my primary server. The main advantage is the absence of bloat, e.g. components like DBus or systemd that increase the attack surface. The use of musl vs. glibc does make some things more complicated, however.


> The main advantage is the absence of bloat, e.g. components like DBus

? Like most distros that start you off but nothing but a minimal base, you can choose whether to install DBus or not. Almost everyone using Alpine as a daily driver on their PC probably has DBus installed and enabled.


postmarketOS is based on it. I tried it on my PinePhone, it works, but in the end I went with Arch Linux ARM.


I use it as a daily driver on my Raspberry Pi. Since the community is small the package repositories are a bit small as well, and I occasionally have to build stuff by hand (painful on the Pi). Add musl to the ARM platform and most binaries in the wild won't run. However, musl and apk means the Alpine is a lot faster than, say, Raspbian or Arch.


I love Alpine on the Raspberry Pi Zero family. Not only does this create a durable and speedy ramdisk appliance, but experience configuring and minimizing the build size translates to containers as well.


I use it as a daily driver. Here is my setup. Feel free to leave feedback for improvements!

https://lamda-chops.bearblog.dev/alpine-linux/


Powers my router, running on an APU2. The run-from-ram-with-overlays configuration makes upgrades relatively painless.


I use Alpine as my server OS, with Alpine, Ubuntu and CentOS containers running on it. It works great this way too.


I haven't used it as a desktop, but as a minimal VM for bastion SSH servers.




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

Search: