How to Install Docker on Your Raspberry Pi

How to Install Docker on Your Raspberry Pi

  • by Tyler (242)
  • Time to complete: 15 minutes

Docker is a tool that allows you to deploy applications inside of software containers. This can be useful for the Raspberry Pi because it allows users to run applications with very little overhead, as long as the application is packaged inside of a Docker image. You simply install Docker and run the container. This guide will walk you through the process of installing Docker on any version of Raspbian.

Important Note

Update: Although this guide is still relevant, some people are experiencing issues with the add-apt-repository command. I've added a note in the appropriate step below for those that wish to follow the guide I've laid out, but I believe the best way moving forward is to use a much simpler method and install directly from See the example below.

curl -sSL | sh

Since Raspbian is Debian based, we will use apt to install Docker. But first, we need to update.

sudo apt-get update

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

curl -fsSL | sudo apt-key add -

Verify the correct key id:

apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D

Set up the stable repository:

sudo add-apt-repository \
       "deb \
       raspbian-$(lsb_release -cs) \

Note: If you're experiencing issues with the add-apt-repository command, you can add the line directly to the sources.list file. See below:

sudo vim /etc/apt/sources.list

Append the following: raspbian-RELEASE main

Replace RELEASE with the Raspbian release you're using.

To find your release use:

lsb_release -cs

First, update apt again.

sudo apt-get update

Now install Docker Engine.

sudo apt-get -y install docker-engine

To test docker we'll run the hello-world image.

sudo docker run hello-world

If Docker is installed properly, you'll see a "Hello from Docker!" message.