This project builds and publishes Docker images for Raspberry Pi OS Lite on Docker Hub.
Images are published as multi-arch manifests. Use the table below to choose the right tag for your device:
| Device Type | Recommended Tag | Alternative Tags (aliases) | Available Platforms | Notes |
|---|---|---|---|---|
| Raspberry Pi 3, 4, 400, 5 (64-bit OS) | arm64 |
arm64-<date>,64-bit,64-bit-<date> |
linux/arm64 |
Best performance on modern Pis |
| Raspberry Pi 2, 3, 4, Zero 2 (32-bit OS) | armhf |
armhf-<date>,32-bit,32-bit-<date> |
linux/arm/v7,linux/arm64 |
Default choice for 32-bit systems |
| Raspberry Pi Zero (v1), Pi 1 | armhf |
armhf-<date>,32-bit,32-bit-<date> |
linux/arm/v6 |
Legacy devices (32-bit armel) |
Tip
- Use
arm64if your OS is 64-bit and you’re on a newer Pi. - Use
armhffor 32-bit compatibility or older boards. - (Pro Tip: The
arch-YYYYMMDDtag aliases are immutable and built from the official Raspberry Pi OS Lite root filesystems published on that specific date. These will never change. Choose these to ensure reproducibility.)
This section explains how to set up Docker on your machine and work with the Raspberry Pi OS Lite images provided by this project. Follow the steps below to get started.
On macOS, you can install Docker Desktop (which includes Buildx) via Homebrew:
brew install --cask docker-desktopAfter installation, launch Docker Desktop complete the setup (accepting licenses, etc.), before building any images.
These images can be used as a base for Raspberry Pi OS Lite-specific containers:
FROM webdavis/raspios-lite:arm64-20250513
# Add your own layers here...Or run a container directly, like so:
docker run --rm -it --platform linux/arm64 webdavis/raspios-lite:arm64Note
To run ARM containers on an x86_64 (Intel/AMD) host, QEMU emulation must be enabled (see below).
Install QEMU and enable binfmt support via your system’s package manager:
sudo apt install qemu-user-static binfmt-supportAdd the following to your NixOS config (/etc/nixos/configuration.nix):
environment.systemPackages = with pkgs; [
qemu_user_static
binfmt
];Then run the following:
sudo nixos-rebuild switchsudo dnf install qemu-user-static binfmt-supportsudo pacman -S qemu-user-static binfmt-supportThis project requires Docker and Buildx.
Again, assuming you're on macOS, you will need to install Docker Desktop (which comes with Buildx) via Homebrew:
brew install --cask docker-desktopDownload this repo:
git clone git@github.com:webdavis/docker-raspios-lite.gitThen switch into the project directory:
cd docker-raspios-liteUse the docker-wrapper.sh script to build and inspect project images
on your dev machine.
docker-wrapper.shis a convenience script that makes working on this project a tad easier.
To build the 64-bit variant for an arm64 architecture, run the following command:
./docker-wrapper.sh -a -oNote: The
-ooption will append the--loadflag to thedockercommand, which loads the built image into Docker so that you can run it locally.
When building a 32-bit image with the -h flag, you must specify which Platform the image
should be built for, for example armv7 or armv6. The following table will help you:
armv7→linux/arm/v7(most models: Pi 2, 3, 4, Zero 2)armv6→linux/arm/v6(Pi Zero v1, Pi 1, legacy)arm64→linux/arm64(32-bit on 64-bit hardware)
For example, run the following command to build and load a 32-bit image for Pi 2/3/4/Zero 2:
./docker-wrapper.sh -h armv7 -oThe following command lists the architectures this project has built locally on your machine:
./docker-wrapper.sh -lThe command below lists the image manifests from Docker Hub that are tracked by this project, which shows all available platforms (architectures/OS variants) that the image supports.
Note
Commands that access Docker Hub require you to be logged in via docker login.
./docker-wrapper.sh -rThis project uses Hadolint to enforce Dockerfile best
practices.
Hadolint can be installed using Homebrew:
brew install hadolintTo lint the Dockerfile, run:
hadolint DockerfileLinting rules for this project are defined in the .hadolint.yaml
file.
The latest root file system for Raspberry Pi OS Lite is provided as root.tar.xz in Raspberry
Pi's official downloads archive.
Just click on the latest version (or most recent date).
This project provides a justfile for ease-of-use.
Install it like so:
brew install justjust is a handy way to run project-specific commands.
For example, instead of typing in ./docker-wrapper.sh --arm64 --push, you can simply run:
just AInstead of using docker image ls -a to list all Docker images, you can simply run:
just cAnd then delete them all with:
just C