Install Docker on Raspberry Pi

Published on , Updated on installation internet of thinks installation raspberry pi docker iot


  • 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="9 (stretch)"

Install Docker

  • Update and Upgrade Existing Packages:

    sudo apt-get update && sudo apt-get upgrade -y
  • Install the Docker client:

    curl -sSL | 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


Related Contents