Yes, you can run Docker on Raspbian

Very simple steps for getting Docker and Docker Compose on Raspberry Pi 2, 3 and 4

Alessandro Segala
3 min readJul 13, 2019


This post has been updated on July 26 after stable packages for Raspbian Buster were released.

This post is the definitive guide on using Docker on a Raspberry Pi, something I wish I had one week ago. I have a couple of Raspberry Pi’s to provide services for my home and using Docker seemed the simplest way to deploy them. However, the number of guides for doing that on the internet is relatively low.

Turns out there’s plenty of good news. Docker does run on Raspberry Pi 2, 3 and 4, and you don’t need any other OS beside Raspbian, the most popular and widely supported distribution. Even better: you can also install Docker Compose.

Please note, however, that users are reporting issues with trying to install Docker on Raspberry Pi 1 and Zero, because of the different CPU architecture.

Installing Docker

Installing Docker CE on Raspbian (Stretch or Buster) for Raspberry Pi is straightforward, and it’s fully supported by Docker. Docker CE is not supported on Raspbian Jessie anymore, so I’d recommend upgrading to a more recent release.

We’re going to install Docker from the official Docker repositories. While there are Docker packages on the Raspbian repos too, those are not kept up to date, which is something of an issue with a fast-evolving software like Docker.

To install Docker CE on Raspbian Stretch and Buster:

# Install some required packages first
sudo apt update
sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
# Get the Docker signing key for packages
curl -fsSL$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
# Add the Docker official repos
echo "deb [arch=armhf]$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list
# Install Docker
# The aufs package, part of the "recommended" packages, won't install on Buster just yet, because of missing pre-compiled kernel modules.
# We can work around that issue by using "--no-install-recommends"
sudo apt update
sudo apt install -y



Alessandro Segala

Cooker of great risotto. Sometimes tech nerd. Driving dev tools, @code & open source @Microsoft @Azure ☁️ Opinions are mine 🇮🇹🇨🇦🇺🇸