Skip to main content
  1. Decisions/

Hold on Alpine Linux

·768 words·4 mins·
Author
Agent IO
I love the ideas behind this lightweight distribution, but it's challenging in practice.

Recently I spent a few days exploring Alpine Linux.

For years I've followed advice to use Alpine in container builds as a lightweight base image. Recent casual reading got me thinking about possibly using Alpine as a base for a custom desktop distribution or (more seriously) for appliances that run containers using Nomad or directly with Docker or Podman. I had some spare Raspberry Pis and was able to quickly install Alpine on one using rpi-imager. From there I set up Podman, Nomad, and Vault in a four-node Alpine-based cluster of Raspberry Pis.

My first impressions were great: even on my Pi 4's, Alpine felt snappy. In hindsight, I think this was partly because Alpine had a better default sshd configuration which made logging in faster on my Alpine Pis than my Ubuntu-based ones. But it was also undeniably faster to install and set up.

After digging a bit deeper, I'm pausing my Alpine explorations. I don't have a compelling enough use to make it worth addressing the disadvantages noted below. Ubuntu is working out well enough for me and is less of a barrier to potential adopters. Still, Alpine is a tempting base that I might dig into again.

Pros

  • Alpine is lightweight and feels really fast on my Raspberry Pis.
  • Alpine's founder (Natanael Copa, Meet the Creator of Alpine Linux) seems like an effective steward.
  • Building the core utilities on busybox seems clever and efficient.
  • musl seems like a good idea. Without looking into it, it's easy to believe that libc is bloated.
  • OpenRC is easy to configure and use.
  • I really like the packaging system (apk); it was easy to use it and not hard to set up a repository.
  • Tailscale is in the community repository and was easy to install. With it, I can ssh into my Alpine machines from any machine in my tailnet.
  • Although I had to build these tools myself, I was easily able to get Nomad, the Nomad Podman driver, and Vault running on a small cluster of four Raspberry Pis.

Cons

Of these, the "major" problems are ones that I don't want to solve myself, the "minor" ones are ones that I think I could easily deal with, and "nits" are things that bug me but that I can easily accept.

  • Major: musl has memory allocation performance problems. WizOS uses libc instead of musl, but do I really want to use a corporate distribution? (No.)
  • Major: Tailscale doesn't fully work in Alpine, apparently due to DNS problems. tl;dr I can't see other machines in my tailnet from my Alpine nodes. Maybe I'm too dependent on Tailscale now, but this currently trips me up.
  • Minor: The cloud providers that I currently use (Digital Ocean and Google) don't offer Alpine images. This has been said to be due to a lack of cloud-init support, or to difficulty adapting to OpenRC. These problems seem to be addressed by third-party projects and the Alpine project offers cloud images. I found that Linode and Hetzner (and possibly others) directly offer Alpine images, although I didn't try either.
  • Minor: I didn't work out a way to automate setup of my Pi Alpine instances.
  • Minor: It seems risky to use Alpine on a desktop. I'm not currently interested in digging deeper into Linux desktop environments.
  • Minor: Nomad and Vault were removed from the community repository over licensing issues and I was unable to find another source, so I had to build my own Nomad and Vault instances.
  • Minor: Package generation is nicely centralized in the buildrepo tool, but it would be very slow to sequentially rebuild a large repository. I haven't seen a way to parallelize this, but I expect that it exists somewhere.
  • Nit: Modifying busybox would be hard, but it's trivial to replace individual commands with their own binaries.
  • Nit: I'm not particularly a Lua fan, but I can see its usefulness in apk.

Update 2026-06-29

I briefly considered experimenting with Alpine+Podman on my Raspberry Pi cluster. This seemed like an appealing lightweight way to run containers (Alpine is so fast!), but it still has some blocking problems:

  • Because Alpine uses OpenRC instead of systemd, I can't use quadlets.
  • I use one of my Raspberry Pi's as a kiosk running github.com/bobasensei/structures. This is really easy to do with Ubuntu Frame and arguably impossible with Alpine, given the state of documentation and examples on the web. Alpine is just too lightly documented for me to depend on it.

Abandon all free time, ye who enter here.

🦋 Comment with ATProto