Run Docker on Raspberry Pi

This guide will explain how to run Docker on Raspberry Pi

Posted by Tobias L. Maier on October 29, 2016

Download Raspbian Lite

The light version is enough, as we will use the OS only to start and manage Docker. Download it from

$ curl -L -O

Install ApplePi-Baker on Mac OS X

This is being used to “bake” the Linux image previously downloaded onto the SD

$ brew cask install applepi-baker

Start the application, everything else is self-explanatory.

Configure Wifi

We want to run Raspberry Pi in a headless mode. This means we need to configure the Wifi credentials prior starting the system.

Follow the instructions at

The Linux file system is not visible on MacOS X. I mounted the SD card onto a Virtual Machine with Linux. There I was easily able to edit the files.

Start Raspberry Pi

Unmount the SD card from Mac, insert it into the Raspberry Pi and start the Raspberry Pi.

SSH into the Raspberry Pi

Default username: pi, Password: raspberry

$ ssh pi@<your IP address>

Install Docker

As described at, use the following command to install Docker:

$ curl -sSL | sh

Confirm Docker runs successfully

Start the Docker daemon

$ sudo service docker start

Now everything is ready to go. Confirm this with the following command:

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

What next?

  • Improve the security of your Raspberry Pi, by replacing the SSH login with username:password with a SSH certificate
  • Configure your Docker client on your computer to directly connect to your Raspberry Pi Docker instance
  • Find some interesting containers and try them out. Most Raspberry Pi-specific containers start with “rpi-” in the name