How to install Docker to Raspberry Pi

1 min read

It's pretty easy to develop and run apps in containers, isn't it?

Docker core

Install Docker itself via script from the official site. 

curl -sSL https://get.docker.com | sh

Add permission to Pi User to run Docker Commands if it is necessary. Reboot RPi or recreate terminal session afterwards.

sudo usermod -aG docker pi

Check docker version to make sure the installation was successful.

docker -v

Docker-compose script

Install python dependencies for docker-compose

sudo apt-get install -y libffi-dev libssl-dev python3 python3-dev python3-pip

Install Docker Compose

sudo pip3 -v install docker-compose

Now you can use docker-compose command.

Links

dev.to www.raspberrypi.org