How to install docker in the raspberry pi zero manually
While attempting to start to run some personal projects in a small raspberry I had some issues while attempting to install Docker. After I realised what I was doing wrong I decided to share what I did to accomplish.
To develop the projects I like to setup a Linux VM where I can configure all the needed dependencies(IDE, java versions, etc…) so that later on I can simply delete this VM if something goes wrong. Therefore, the first step was to connect through ssh to the raspberry pi using windows(through USB using putty), after this was accomplished, I shared the network from the raspberry pi interface to the Linux VM allowing me to manage the raspberry pi from the VM.
Install Docker Manually
For installing docker manually I was first required to download the packages required manually, and I selected the following versions:
- containerd.io 1.2.13–1
- docker-ce 19.03.7~3–0-raspian-buster
- docker-ce-cli 19.03.7~3–0-raspian-buster
To find and download these packages I went to the following link
After you have all these packages downloaded in a folder I needed to add them to raspberry pi, to do this I used the scp command(don't forget to change the <folder_to_copy> and the <raspberry-pi_ip>):
scp -r <folder_to_copy> pi@<raspberry-pi_ip>:/home/pi/Desktop
The above command created the folder under Desktop with the packages inside. Now the next step would be to install the packages, to do so, we will use the dpkg command:
sudo dpkg -i containerd.io_1.2.13-1_armhf.debsudo dpkg -i docker-ce-cli_19.03.7_3–0_raspbian-buster_armhf.debsudo dpkg -i docker-ce_19.03.7_3–0_raspbian-buster_armhf.deb
After this Docker was successfully installed, the only missing optional step is to ensure you can run docker commands without using sudo, to do this run the following:
sudo usermod -aG docker $USERnewgrp docker
Install everything faster
These are just a few steps but if you want to do this faster I have a little repository with these packages and two bash scripts. One to install and the other to remove docker in case you want to uninstall it. The repo can be found here.
In order to install you just need to perform:
And when you need to delete it:
And that’s it! :) I faced some issues regarding the incompatibility issues due to the architecture of the raspberry and also some known issues of some versions, so I decided to share the walkthrough in case anyone else wishes to accomplish something similar. This is also my first story on Medium, in case you realised I should improve doing something, feel free to reach out to me!
Although the preferred method of installing programs is via the package managers described in Chapter 3, Adding…
How to uninstall packages from Ubuntu [With Easy GUI and CLI examples] - LinuxForDevices
In this module, we will learn how to uninstall packages from ubuntu, being a snap or apt package. There are various…
"Illegal instruction" when running docker · Issue #56 · siemens/meta-iot2000
Starting from meta-iot2000-bsp, I added the docker recipe from the meta-virtualization layer, but every docker-related…
Error when starting docker.service
Hello, so my problem is that when I try to connect a node (Raspberry Pi zero W w/ Raspbian Stretch) to a swarm manager…