I use Ubuntu For Raspberry PI

Remove all old staff if any:

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


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

To check the Ubuntu Version use lsb_release -a

Docker is supported on one of:

  • Ubuntu Groovy 20.10
  • Ubuntu Focal 20.04 (LTS)
  • Ubuntu Bionic 18.04 (LTS)
  • Ubuntu Xenial 16.04 (LTS)

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:


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