Installing Docker on Raspberry Pi

docker edit

To install Docker on Raspberry PI, run the following commands:

sudo apt-get install apt-transport-https ca-certificates software-properties-common -y

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

sudo usermod -aG docker pi

sudo curl https://download.docker.com/linux/raspbian/gpg

Then edit sources.list

sudo nano /etc/apt/sources.list

and add the following line at the end:

deb https://download.docker.com/linux/raspbian/ buster stable

Make sure to replace your version name (buster above) with the correct one.

Patch and update OS:

sudo apt-get update
sudo apt-get upgrade -y

and start Docker service:

sudo systemctl start docker.service

Reboot pi and when it comes back online, run the line below to test the installation:

docker info

It should print diagnostic information about Docker.

Resources