I’m currently working on a fun side project involving 5 Raspberry Pis and an arduino (a stupidly long post about that coming in the future, fear not) and I’ve run into an issue on both my Raspberry Pi 2 and my Raspberry Pi Zero W when trying to get docker working.
What’s the problem?
Well, I am no expert on these things, but essentially the Pi 2 and the Zero run an older processor, ARM6 types to be precise. The issue when you try to install docker using their excellent one liner, it barfs right at the end with a failure…. this seems to be caused by one of the packages that docker requires (containerd.io) not liking these older arm processors… but it used to run fine.
What’s the solution?
Pretty simple.. use an older version of containerd.
How do I do that?
Glad you asked. Pretty simple. (Assuming you have your pi setup correctly with buster, and all the packages up to date)
To start, run the basic docker install script
sudo curl -sL get.docker.com | bash
This will spit out an error at the end. Fear not.
Basically, you need to go back, overwrite the containerd install with an updated (yet older) version. (I’ve added in the sudos as that’s the way I need to run this on my fairly vanilla pi install)
cd /tmp wget https://packagecloud.io/Hypriot/rpi/packages/raspbian/buster/containerd.io_1.2.6-1_armhf.deb/download.deb sudo dpkg -i download.deb sudo rm download.deb sudo systemctl restart docker
And one last step… don’t forget to add your current user (in my instance “pi”) into the docker group, so you don’t’ need to sudo everything
sudo usermod -a -G docker pi
Now, restart your pi so all these changes can take effect
sudo shutdown -r now
… and once it boots back up, you should be able to run docker normally, try it out with
One final note here…. I usually test docker with hello-world
docker run hello-world
For whatever reason, this image doesn’t work on ARM6 pis.. I haven’t dug into it much, as the image I needed worked fine. But be aware if you try to run that and it barfs (or as in my case, just exits with no output) don’t worry, other images should work fine.