Raspberry Pi 4 works with Docker – Installation and Unboxing

This post works with Raspbian 10 buster on CPU ARMv7 rev 3 (v7l) @ 4x 1.5GHz, model Raspberry Pi 4. It solves the problem of cannot adding apt repositories for Raspbian Buster when following Docker Official Installation Docs, issues may happen at here.

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \


Successfully install Docker in Raspberry Pi 4

As for solving the problem, we need to install it from .deb files which are located in these URLs from Official




So you need to install the stretch packages on Buster. It turns out that the Docker packages for Raspbian Stretch actually work without modifications on Raspbian Buster, so we can just use those and install them using dpkg.

wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/containerd.io_1.2.6-3_armhf.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce_18.09.7~3-0~debian-buster_armhf.deb

dpkg -i containerd.io_1.2.6-3_armhf.deb
dpkg -i docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb
dpkg -i docker-ce_18.09.7~3-0~debian-buster_armhf.deb
sudo usermod pi -aG docker

That’s it, now log out and log in again.

Test It!

It works!

Installing CUPS

I use docker to run CUPS in Raspberry Pi 4 as a Printer Server. Reference to olbat/cupsd. Use this script. Mapping container’s 631 port to Pi’s 631 port

docker run -d -p 631:631 -v /var/run/dbus:/var/run/dbus --name cupsd olbat/cupsd

Then the image is downloading, and running successfully.