Installing Docker on Raspberry Pi

With Docker booming and more and more containerised applications coming out while it's very appealing to install Docker on a Raspberry Pi. In fact, I've been running my own website with Docker on Raspberry Pi for years. Luckily it's easier than ever to install Docker on Raspberry Pi šŸ˜Ž!

Installing Docker

To install Docker on Raspberry Pi, just run their automated install script.

curl -sSL | sh

And add the pi user to the docker group so you can run easily spin up docker containers without sudo. In order for this command to take effect you might need to log out and in again.

 sudo usermod -aG docker pi

If all went well you should be able to run containers on your Raspberry Pi now.
Check your docker version & run the Hello World container to verify the installation.

docker --version
docker run hello-world


What about docker-compose?

But what's Docker without docker-compose, right šŸ˜¢?
To install docker-compose, run the following commands.

sudo apt-get install python3-pip -y
sudo pip3 install docker-compose

You can verify the installation succeeded by running

docker-compose --version

That should output something like

docker-compose version 1.24.1, build 4667896