You may have tried to install Docker on your Raspberry Pi using the installation script provided by Docker Inc, but you've run into a problem. I'm going to help you work around the problem in this short post.
When you tried to install docker
, you probably got an error like this:
# curl -fSLs https://get.docker.com | sudo sh
Error cannot install / no package found.
What does that mean? It means that the Docker Inc. team have not yet published a package for the Raspbian Buster release. You may even be following a blog post or tutorial that specifically says that you need to use Raspbian Stretch.
On June 20th 2019 I raised an issue on Docker's moby repository and they are aware of the problem. Unfortunately we'll have to wait for Docker to publish the packages, before we can use the utility script to install it.
Pick up a Raspberry Pi 4
At time of writing, the RPi4 with 4GB RAM is the best option for building and running Docker images. It is also well suited to running Kubernetes using k3s and k3sup
The workarounds
- Revert to Raspbian Stretch - Stretch works perfectly well and I can see no reason to upgrade, unless you're using RPi4 which seems to require it.
- 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.
You can download Raspbian Buster here
What next?
Did you like the blog post? Follow me on Twitter @alexellisuk for more.
Subscribe to issue #39417 so that you can find out when this workaround is no-longer required.
7th August 2019: I wanted to update everyone and let you know that Docker has published an apt package for Raspbian Buster. You'll no-longer require the work-arounds.
You can hire me for advise on Cloud Native architecture, design and computing. Schedule a drop-in session via my Calendly.