Install docker on Raspberry PI

#StandWithUkraine
Today, 27th January 2023, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities. We are uniting against Putin’s invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.

I use Ubuntu For Raspberry PI

Remove all old staff if any:

sudo apt-get remove docker docker-engine docker.io containerd runc

Install:

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

To check the Ubuntu Version use lsb_release -a

Docker is supported on one of:

Get GPG:

 curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

All previous commands related for any Ubuntu-based distro on any machine. But next commands will be different for the processor:

cat /proc/cpuinfo 

/proc/cpuinfo ARMv7 output

So our board has ARMv7 processor instead of Intel/AMD x86, by quick googling you might understand that it is armhf category on docker website:

Armhf

So for RPI we need :

echo \
  "deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Now install Docker (these commands will be again same for any machine with any CPU):

 sudo apt-get update
 sudo apt-get install docker-ce docker-ce-cli containerd.io

#raspberry-pi
0
Ivan Borshchov profile picture
Mar 16, 2021
by Ivan Borshchov
Did it help you?
Yes !
No