
Running Docker on a Raspberry Pi ARM opens up a huge library of self-hosted services — from media servers to home automation to monitoring stacks. This guide covers everything: installing Docker on a Raspberry Pi, understanding ARM64 image compatibility, the most useful containers to run, and storage best practices to keep your SD card from dying prematurely.
Requirements
- Raspberry Pi 3B+, 4B, or 5 (2GB RAM minimum, 4GB recommended)
- Raspberry Pi OS Lite 64-bit — the 64-bit OS is important, as many images only ship ARM64 builds
- A decent SD card or, better, a USB SSD (SD cards degrade fast under Docker’s write load)
Install Docker on Raspberry Pi
Don’t use the version in apt — it’s outdated. Use Docker’s official install script:
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker
Verify it works:
docker run --rm hello-world
Install Docker Compose
Docker Compose V2 is included with modern Docker installations as a plugin:
docker compose version
If it’s missing:
sudo apt install -y docker-compose-plugin
Docker Raspberry Pi ARM compatibility: what you need to know
The Pi 4 and 5 are ARM64 (aarch64) machines when running the 64-bit OS. Most major images on Docker Hub now publish multi-arch manifests — when you pull nginx or postgres, Docker automatically grabs the ARM64 layer. You don’t need to do anything special.
Where you’ll run into trouble is with niche or older images that only have amd64 builds. Before pulling an image, check Docker Hub for the supported architectures. If ARM64 is missing, look for community forks or check Linuxserver.io — they maintain ARM-compatible builds for dozens of popular self-hosted apps.
Useful containers to run on your Raspberry Pi
Portainer — Docker management UI
docker run -d \
--name portainer \
--restart always \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
Nginx Proxy Manager — reverse proxy with SSL
services:
npm:
image: jc21/nginx-proxy-manager:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
- 81:81
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
Uptime Kuma — self-hosted status page
docker run -d \
--name uptime-kuma \
--restart always \
-p 3001:3001 \
-v uptime-kuma:/app/data \
louislam/uptime-kuma:1
Grafana + Prometheus — metrics and dashboards
services:
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
ports:
- 9090:9090
grafana:
image: grafana/grafana:latest
restart: unless-stopped
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
volumes:
prometheus_data:
grafana_data:
Storage: use a USB SSD
SD cards have a finite write cycle count and will fail eventually — often within months under Docker workloads. Mount the SSD at /var/lib/docker:
sudo systemctl stop docker
sudo mv /var/lib/docker /mnt/ssd/docker
sudo ln -s /mnt/ssd/docker /var/lib/docker
sudo systemctl start docker
Useful commands
docker stats
docker system prune -a
docker logs -f container_name
docker compose pull && docker compose up -d
Related posts
Once you have Docker running on your Pi, you can use it to self-host a password manager — see Self-hosting Vaultwarden on a VPS. You can also add a WireGuard VPN to reach your services from anywhere, or Pi-hole for network-wide ad blocking.