How To install Docker on Raspberry Pi (Debian-based OS) 1

Step 1: Update the Raspberry Pi

Before installing Docker, you will want to make sure your Raspberry Pi is up-to-date. To do this, open a terminal window and type the following command:

Note: if curl is not installed, install curl package by running the following command in your terminal:

Step 2: Install Docker

To install Docker on your Raspberry Pi, you will first need to add the Docker package repository to your system. To do this, type the following command in your terminal window:

Step 3: Add the Pi user to the Docker group

By default, the Pi user is not a member of the Docker group. To add the Pi user to the Docker group, type the following command:

Step 4: Start the Docker service

Now that Docker is installed and the Pi user is a member of the Docker group, you can start the Docker service. To do this, type the following command:

Step 5: Test the installation

To test that Docker is working properly on your Raspberry Pi, you can run the following command:

This command will download and run a test container, which will display a message indicating that Docker is working correctly.

Note: You may see a warning message that states that the Docker daemon is not running on your system. This is expected, as the Docker daemon is not running in the background by default on the Raspberry Pi.

Step 6: Enable the Docker service

To enable the Docker service so that it starts automatically on boot, type the following command:

You have successfully installed and configured Docker on your Raspberry Pi. You can now run and manage Docker containers.

(optional) Step 7: Install docker-compose

To install docker-compose, type the following command:

4/5 - (1 vote)

One comment on “How To install Docker on Raspberry Pi (Debian-based OS)

  1. Reply Max Mackenzie Oct 22,2023 2:01 pm

    Thank you SOOO much this guideline almost done everything ๐Ÿ™‚ all others ended up in errors with docker compose installation for latest version of Raspberry OS 2023 Debian version.

    step 5 I needed do following
    Line number 1: sudo to docker run hello-world

    step 7 to install the docker compose I needed to do following
    Line number 2: sudo apt install python3 docker-compose

Leave a Reply