How to Docker on Raspberry PI (Raspbian)

Docker Logo

If you like tinkering with Docker and have a Raspberry PI available, you’re in luck! You can now install Docker on your RPI without messing with complicated stuff, fire up a terminal and follow this tutorial.

Prerequisites

Important
I take absolutely NO responsibility of what you do with your machine; use this tutorial as a guide and remember you can possibly cause data loss if you touch things carelessly.

In order to follow this tutorial you will need:

  • A Raspberry PI with Raspbian Wheezy, Jessie, Stretch or superior.
  • Administrator privileges
  • About 10 minutes if you have a fast connection.

Setting up the required software

In this step we’re going to install the required software in order to set up the Docker repository correctly and safely:

Rasbpian 7/8/9
$ sudo apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common

Now it is time to acquire the GPG key:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

If you want to check the fingerprint here it is for reference (if you don’t trust me, and that’s perfectly fine, verify on the official website): 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.

Add the repository

In this step we’re going to add the repository:

Rasbpian 7/8/9
$ echo "deb [arch=armhf] https://download.docker.com/linux/debian \
     $(lsb_release -cs) stable" | \
     sudo tee /etc/apt/sources.list.d/docker.list

Install Docker CE

And finally:

Rasbpian 7/8/9
sudo apt-get update
sudo apt-get install docker-ce
systemctl enable --now docker

And voilĂ ! You now have installed Docker on your Raspberry PI! You can continue your reading about Docker here:

Image courtesy of mark | marksei

The following two tabs change content below.
The IT guy with a little boredom look in his eyes, fond of computers since forever he now works as a freelancer in the IT and shares his experiences through this blog.

Latest posts by mark (see all)

You may also like...