DEV Community

Zach Koch
Zach Koch Subscriber

Posted on • Edited on

Install Docker Engine on Raspberry Pi OS (64-bit)

This was tested on a Raspberry Pi 5 with a fresh install of Pi OS 64-bit bookworm.

These instructions are available on the official site, but they are somewhat hidden away.

If you want to skip reading the instructions I have made a script that you can run directly from the terminal of your Pi

sudo curl -sL https://raw.githubusercontent.com/ezekeal/scripts/main/docker-pi.sh | bash
Enter fullscreen mode Exit fullscreen mode

Add GPG Keys

you will get no output from these commands

sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
Enter fullscreen mode Exit fullscreen mode

Add the Docker repositories

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Enter fullscreen mode Exit fullscreen mode

this will also have no output

now update

sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

You should see a line with https://download.docker.com/linux/debian if the previous steps were completed correctly

Install the Docker packages

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

Test your installation

sudo docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.