Environment

  • Operating System : Raspbian GNU/Linux 9 (stretch)
  • Model : Raspberry Pi 2 (Model B)

Docker Installation Procedure on Raspberry Pi

The following steps showed the step by step installation guideline.

Raspian Information

  • Check the model of the Raspberry Pi:
cat /proc/device-tree/model

It confirms that I have a Raspberry Pi 2 (Model B)

Raspberry Pi 2 Model B Rev 1.1
  • Check the Operating System (OS) of the Raspberry Pi:
cat /etc/os-release

This shows the details information of the OS.

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Install Docker

  • Update and Upgrade Existing Packages:
sudo apt-get update && sudo apt-get upgrade -y
  • Install the Docker client:
curl -sSL https://get.docker.com | sh

alt docker version

  • Add current user to docker group to user Docker as a non-root user:
sudo usermod -aG docker ${USER}
  • Log out and re login to the system to take effect. Default password of Raspian is: raspberry.
  • Check Docker version:
docker --version
Docker version 19.03.12, build 48a6621
  • Run the hello-world docker application:
docker run hello-world

alt docker run hello-world

Reference

Advertisement

Citation

Click to select citation style

Shovon, A. R. (2020, August 30). Install Docker on Raspberry Pi. Ahmedur Rahman Shovon. Retrieved September 30, 2025, from https://arshovon.com/blog/install-docker-on-raspberry-pi/

Shovon, Ahmedur Rahman. “Install Docker on Raspberry Pi.” Ahmedur Rahman Shovon, 30 Aug. 2020. Web. 30 Sep. 2025. https://arshovon.com/blog/install-docker-on-raspberry-pi/.

@misc{shovon_2020_install,
    author = "Shovon, Ahmedur Rahman",
    title = "Install Docker on Raspberry Pi",
    year = "2020",
    url = "https://arshovon.com/blog/install-docker-on-raspberry-pi/",
    note = "[Online]"
}
Related contents in this website
Install Docker on Raspberry Pi