Glossary

Alpine Linux

Alpine Linux is a small, security-oriented Linux distribution built around musl libc and BusyBox. A minimal install is only a few megabytes, and the alpine Docker image is around 5 MB, making it the go-to base image for minimal containers. Its focus on security includes compiled-in hardening flags, a minimal attack surface, and an opinionated default configuration.

Alpine uses its own package manager, apk:

apk update
apk add nginx
apk del nginx
apk search keyword
apk info -L nginx

The switch from the more common glibc to musl libc has consequences: some precompiled binaries (notably those expecting glibc-specific features) do not work on Alpine without rebuilding. This occasionally causes friction when containerising existing software. Nevertheless, for simple services, microservices, and anything where image size matters, Alpine's trade-offs are almost always worth it.

Alpine is also used on bare metal for network appliances, routers, and other embedded Linux systems. Its init system is OpenRC, not systemd, which makes it appealing to people who prefer smaller init systems. For general-purpose servers and desktops, more feature-rich distributions are usually easier; for containers and security-sensitive deployments, Alpine shines.

Related terms: busybox, musl, apk, Distribution

Discussed in:

Also defined in: Textbook of Linux