In this post, I shortly describe how to install Docker on Raspberry Pi 4 running Raspian Buster. There are many tutorials available describing the process, but I faced always an error when trying to install Docker on my Raspberry Pi 4. So I share here how I got Docker finally installed.
Jul 13, 2019 Installing Docker. Installing Docker CE on Raspbian (Stretch or Buster) for Raspberry Pi is straightforward, and it’s fully supported by Docker. Docker CE is not supported on Raspbian Jessie anymore, so I’d recommend upgrading to a more recent release. We’re going to install Docker from the official Docker repositories. While there are. Apr 06, 2020 Raspberry Pi on the other side is a great low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. In this tutorial, I will show you how to install Docker and Docker Compose on Raspberry Pi with just a few easy steps! Installing Docker. I will use the convenience script provided. Raspberry Pi OS uses what is known as ALSA (Advanced Linux Sound Architecture) to control audio devices. Up until now, both the internal audio outputs on Raspberry Pi – the HDMI socket and the headphone jack – have been treated as a single ALSA device, with a Raspberry Pi-specific command used to choose which is active.
1. Update & Upgrade
As always, first, update and upgrade the system before installing some new packages on Raspberry Pi.
2. Setup Debian to use the legacy iptables
When I tried to follow this tutorial to install Docker on my Raspberry Pi I ran always in an error, where the Docker engine could not be started. The output was similar to that:
When I checked the status of docker.service with

I got the following error message:
I found a very useful hint in a forum from fred727, he wrote: “For me, it was because the docker installer uses iptables for nat. Unfortunately, Debian uses nftables. You can convert the entries over to nftables or just setup Debian to use the legacy iptables”
To do this run the following two commands:
Docker-ce Raspberry Pi 4
3. Install Docker using installation script
Download the script:
Run the script:
4. Add user pi to the Docker Group
By default, only users with administrative rights (root users) can run containers. If you are not logged in as root, one option is to use the sudo prefix.
However, you could also add your non-root user to the Docker group, which allows him to run Docker commands.
This command adds the default user pi to Docker group:

To apply the change, the user must be logged out once and logged in again.

5. Test Docker installation
To test if Docker is installed properly you can run the hello world container with following command:
The software contacts the Docker daemon, pulls the “hello-world” image and creates a new container based on that image. After it goes through all the steps, the output should inform you that your installation seems to be working correctly.