Alpine Linux
A very small Linux distribution often used as a base image because it is only a few megabytes.
In more detail
Alpine uses the musl C library and the BusyBox tools instead of the larger GNU ones, and its package manager is apk. Its /bin/sh is ash from BusyBox, and bash is not installed unless you add it.
Examples
apk add bashdocker run --rm alpine:3.20 grep ^NAME= /etc/os-releasenode:alpine is a common base for the runner stage when a distroless image does not fit.FROM golang:alpine AS buildnode:22-alpine is a common base for Next.js images; add libc6-compat if a native package needs glibc.Related terms
- BusyBox — A single small program that provides slimmed-down versions of hundreds of Unix tools, including a shell.
- Almquist shell — A minimal POSIX shell, called ash, found as /bin/sh in BusyBox and in Alpine Linux containers.
- package manager — A tool that installs, updates and removes software together with what it depends on, such as apt on Debian, apk on Alpine or Homebrew on macOS.
- Linux distribution — A complete operating system built around the Linux kernel, such as Debian, Ubuntu or Alpine Linux.
- base image — The image a Dockerfile starts from with FROM, which supplies the operating system files and often a language runtime.
- minimal base image — A base image with as little inside as possible, such as Alpine, a slim variant or a distroless image, to shrink size and attack surface.
- native addon — A Node.js package that includes compiled C or C++ code, such as some image or database libraries.
- Debian — A long-established, community-run Linux distribution known for stability, used as the base of many images.
Taught in
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- POSIX sh Versus Bash — Bash Scripting & Command Line Automation
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Pull And Inspect A Third Party Image — Docker Architecture & Production Containers
- Run, Stop, Restart And Remove A Container — Docker Architecture & Production Containers
- Build Context, Dockerignore And Your First Dockerfile — Docker Architecture & Production Containers
- FROM, WORKDIR, COPY And ADD — Docker Architecture & Production Containers
- CMD, ENTRYPOINT, USER And Process Signals — Docker Architecture & Production Containers
- Tags, Digests And Reproducible Image References — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Scan, Patch And Inspect The Software Supply Chain — Docker Architecture & Production Containers
- Ephemeral Filesystems And Named Volumes — Docker Architecture & Production Containers
- Bind Mounts, Permissions And Backups — Docker Architecture & Production Containers
- Bridge Networks, DNS And Container Communication — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Diagnose Crashes, Resource Limits And Unhealthy Containers — Docker Architecture & Production Containers
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering
- Shipping in Scratch and Distroless Images — Concurrent Systems Programming with Go
- From Docker To Desired State — Kubernetes: Production-Grade Container Orchestration
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture
- Production Hardening: Graceful Shutdown & Docker — Node.js Internals & Backend Services
- Software Bill Of Materials — Application Security & Threat Modeling for Engineers
- Image Scanning And Trivy — Application Security & Threat Modeling for Engineers