I couldn't install docker with raspberry pi2 b +.

Trigger

When using the surplus Pi2 as a tuner server for a recording server

Target

Make the following two available.

Prerequisites

(However, since the Raspberry Pi used this time is 2B +, it is armhf7l. I don't know if it works in the same way as Pi3 or higher on arm64. )

Work content

Package update

First of all, around the minimum update.

$ sudo raspi-config      #Make the initial settings for various Raspberry Pis. Set the CPU to 1GHz, etc.
$ sudo apt update &&\
 sudo apt upgrade -y &\
 sudo apt autoremove -y

Docker installation

Install Docker. As official.

$ curl -sSL https://get.docker.com | sh

As a caveat, the script that runs by the above process must be E: Sub-process /usr/bin/dpkg returned an error code (1) Will throw an error. Therefore, first remove the installed docker and related packages.

$ sudo apt purge -y docker* && sudo apt autoremove

The cause of this error seems to be a commit problem as of today (September 06, 2020). The commit hash is → 26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c When I looked at it, the issue was still up. https://github.com/docker/for-linux/issues/1035

When I tried journalctl -xe here, the following log was output immediately after starting the docker daemon.

The unit docker.socket has successfully entered the 'dead' state.

It seems that the socket is not good in the first place. Let's take a look at journalctl -u.

Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.586700264+09:00" level=error msg="failed to mount overlay: no such device" storage-driver=overlay2
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.647312450+09:00" level=error msg="AUFS was not found in /proc/filesystems" storage-driver=aufs
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.708413639+09:00" level=error msg="failed to mount overlay: no such device" storage-driver=overlay
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.913269270+09:00" level=warning msg="Your kernel does not support swap memory limit"
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.933919334+09:00" level=warning msg="Your kernel does not support cgroup cfs period"
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.937300344+09:00" level=warning msg="Your kernel does not support cgroup cfs quotas"
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.940482354+09:00" level=warning msg="Your kernel does not support cgroup rt period"
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.940913356+09:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.941234357+09:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Sep 06 10:47:57 raspberrypi dockerd[1135]: time="2020-09-06T10:47:57.941741358+09:00" level=warning msg="mountpoint for pids not found"

Since the kernel is old, it seems that such an error is appearing, so try updating the kernel. Also, since docker is still not working well, I think it is because of modprove, but I can't update the kernel. Delete it in advance. By the way, it took me a long time to get to this solution ...

$ sudo apt purge -y docker* && sudo apt -y autoremove
$ sudo apt install linux-image-rpi2  #sudo apt search linux-image-*Then choose the one that suits your environment.
$ sudo reboot

After rebooting, I tried installing Docker again, but it didn't work.

If you don't mind ...

If you don't mind, please give me some advice ... It's my first time to use Docker in an armhf environment, so I don't know the solution anymore if I get stuck so far. If anyone can solve it, I would be very grateful if you could comment.

Recommended Posts

I couldn't install docker with raspberry pi2 b +.
Install Docker on Raspberry Pi
Install CentOS 7 on Raspberry pi 4 Model B
Launched Redmine with Docker on Raspberry Pi 3
Install Ubuntu Core 18 on Raspberry Pi 2 Model B
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Install Composer with Docker
I tried BIND with Docker
Put Redmine docker container in Raspberry Pi 4 Model B 2GB
Install MariaDB on Raspberry Pi OS
I can't install lombok with Gradle.
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
Raspberry Pi Kubernetes and Docker downgraded story
Put Kanban in Docker of Raspberry Pi 3
Headless install of Ubuntu 20.10 on Raspberry Pi
Raspberry Pi Zero with Ubuntu-style Yocto-gcc with libusb
I tried using Scalar DL with Docker
Install Docker Desktop for Mac with Homebrew
Find Raspberry Pi from Android with mDNS
Install Docker with WSL2 Memo ([Part 2] Docker introduction)
Build Amazon Alexa cheaply with Raspberry Pi 3B + Bluetooth speaker (3 Alexa Voice Service installation)
I tried to verify AdoptOpenJDK 11 (11.0.2) with Docker image
Radiko recording server on Raspberry Pi 4 (Docker unused)
Send emails using Docker container on Raspberry Pi 3
Introduced GROWI to Raspberry Pi 4 Model B (Ubuntu)
I can't do docker-compose up -d with docker
Build Amazon Alexa cheaply with Raspberry Pi 3B + Bluetooth speaker (1. Make a sound first)
How to run javafx with Raspberry Pi Posted on 2020/07/12
Play down with Raspberry PI4 as a server. Part 2
[Note] I suddenly can't build with Docker for windows.
Display characters on I2C 1602 LCD with Raspberry Pi 3 & Java
When I bcrypt with node + docker, I got an error
I struggled with pip install on an M1 Mac
Build an Android image for Orange Pi 4 with Docker
Read temperature / humidity with Java from Raspberry Pi 3 & DHT11