[kwlug-disc] Installing Docker fails on Raspberry Pi 3
Khalid Baheyeldin
kb at 2bits.com
Tue May 4 22:08:30 EDT 2021
With more and more projects abandoning APT as the advocated way for
distributing software, managing dependencies, and updates, it seems that
Docker with image blobs is what most developers today know best.
So I wanted to install Home Assistance as a docker image, and the process
is simple. But before that I need docker installed.
I tried to install it two ways: from the Raspian repositories, or using
Docker's repos:
Both fail with an error about overlay.
My questions are:
1. Can this be fixed easily?
2. If not, is there an alternative (podman, lxc, ...) that can run docker
images?
Thanks in advance.
Details follow:
>From Raspbian repo:
$ sudo apt install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
cgroupfs-mount libintl-perl libintl-xs-perl libmodule-find-perl
libmodule-scandeps-perl libproc-processtable-perl libsort-naturally-perl
needrestart runc tini
Suggested packages:
docker-doc aufs-tools btrfs-progs debootstrap rinse xfsprogs zfs-fuse |
zfsutils iucode-tool
The following NEW packages will be installed:
cgroupfs-mount docker.io libintl-perl libintl-xs-perl libmodule-find-perl
libmodule-scandeps-perl libproc-processtable-perl
libsort-naturally-perl needrestart runc tini
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.8 MB of archives.
After this operation, 183 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.raspberrypi.org/debian buster/main armhf docker.io
armhf 18.09.1+dfsg1-7.1+rpi1+rpt1 [38.4 MB]
Get:2 http://raspbian.freemirror.org/raspbian buster/main armhf
cgroupfs-mount all 1.4 [6276 B]
Get:3 http://raspbian.freemirror.org/raspbian buster/main armhf runc armhf
1.0.0~rc6+dfsg1-3 [2246 kB]
Get:4 http://raspbian.freemirror.org/raspbian buster/main armhf tini armhf
0.18.0-1 [169 kB]
Get:5 http://raspbian.freemirror.org/raspbian buster/main armhf
libintl-perl all 1.26-2 [756 kB]
Get:6 http://raspbian.freemirror.org/raspbian buster/main armhf
libintl-xs-perl armhf 1.26-2+b3 [38.8 kB]
Get:7 http://raspbian.freemirror.org/raspbian buster/main armhf
libmodule-find-perl all 0.13-1 [10.3 kB]
Get:8 http://raspbian.freemirror.org/raspbian buster/main armhf
libmodule-scandeps-perl all 1.27-1 [44.0 kB]
Get:9 http://raspbian.freemirror.org/raspbian buster/main armhf
libproc-processtable-perl armhf 0.56-1 [43.7 kB]
Get:10 http://raspbian.freemirror.org/raspbian buster/main armhf
libsort-naturally-perl all 1.03-2 [13.5 kB]
Get:11 http://raspbian.freemirror.org/raspbian buster/main armhf
needrestart all 3.4-5 [57.4 kB]
Fetched 41.8 MB in 5s (7613 kB/s)
Selecting previously unselected package cgroupfs-mount.
(Reading database ... 148496 files and directories currently installed.)
Preparing to unpack .../00-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package runc.
Preparing to unpack .../01-runc_1.0.0~rc6+dfsg1-3_armhf.deb ...
Unpacking runc (1.0.0~rc6+dfsg1-3) ...
Selecting previously unselected package tini.
Preparing to unpack .../02-tini_0.18.0-1_armhf.deb ...
Unpacking tini (0.18.0-1) ...
Selecting previously unselected package docker.io.
Preparing to unpack .../03-docker.io_18.09.1+dfsg1-7.1+rpi1+rpt1_armhf.deb
...
Unpacking docker.io (18.09.1+dfsg1-7.1+rpi1+rpt1) ...
Selecting previously unselected package libintl-perl.
Preparing to unpack .../04-libintl-perl_1.26-2_all.deb ...
Unpacking libintl-perl (1.26-2) ...
Selecting previously unselected package libintl-xs-perl.
Preparing to unpack .../05-libintl-xs-perl_1.26-2+b3_armhf.deb ...
Unpacking libintl-xs-perl (1.26-2+b3) ...
Selecting previously unselected package libmodule-find-perl.
Preparing to unpack .../06-libmodule-find-perl_0.13-1_all.deb ...
Unpacking libmodule-find-perl (0.13-1) ...
Selecting previously unselected package libmodule-scandeps-perl.
Preparing to unpack .../07-libmodule-scandeps-perl_1.27-1_all.deb ...
Unpacking libmodule-scandeps-perl (1.27-1) ...
Selecting previously unselected package libproc-processtable-perl.
Preparing to unpack .../08-libproc-processtable-perl_0.56-1_armhf.deb ...
Unpacking libproc-processtable-perl (0.56-1) ...
Selecting previously unselected package libsort-naturally-perl.
Preparing to unpack .../09-libsort-naturally-perl_1.03-2_all.deb ...
Unpacking libsort-naturally-perl (1.03-2) ...
Selecting previously unselected package needrestart.
Preparing to unpack .../10-needrestart_3.4-5_all.deb ...
Unpacking needrestart (3.4-5) ...
Setting up runc (1.0.0~rc6+dfsg1-3) ...
Setting up libmodule-find-perl (0.13-1) ...
Setting up tini (0.18.0-1) ...
Setting up libproc-processtable-perl (0.56-1) ...
Setting up libintl-perl (1.26-2) ...
Setting up cgroupfs-mount (1.4) ...
Setting up libsort-naturally-perl (1.03-2) ...
Setting up libmodule-scandeps-perl (1.27-1) ...
Setting up needrestart (3.4-5) ...
Setting up docker.io (18.09.1+dfsg1-7.1+rpi1+rpt1) ...
Job for docker.service failed because the control process exited with error
code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
* docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor
preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue
2021-05-04 15:56:00 EDT; 81ms ago
Docs: https://docs.docker.com
Process: 14997 ExecStart=/usr/sbin/dockerd -H fd:// $DOCKER_OPTS
(code=exited, status=1/FAILURE)
Main PID: 14997 (code=exited, status=1/FAILURE)
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.829556516-04:00" level=info
msg="ccResolverWrapper: sending new addresses to cc:
[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}]" module=grpc
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.829875369-04:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.830402242-04:00" level=info
msg="pickfirstBalancer: HandleSubConnStateChange: 0x4e6c240, CONNECTING"
module=grpc
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.831725466-04:00" level=info
msg="pickfirstBalancer: HandleSubConnStateChange: 0x4e6c240, READY"
module=grpc
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.854267837-04:00" level=error msg="'overlay' not
found as a supported filesystem on this host. Please ensure kernel is new
enough and has overlay support loaded." storage-driver=overlay2
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.854737627-04:00" level=error msg="[graphdriver]
prior storage driver overlay2 failed: driver not supported"
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.859882714-04:00" level=info msg="stopping event
stream following graceful shutdown" error="context canceled"
module=libcontainerd namespace=plugins.moby
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.860127973-04:00" level=info msg="stopping
healthcheck following graceful shutdown" module=libcontainerd
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.863350462-04:00" level=info
msg="pickfirstBalancer: HandleSubConnStateChange: 0x4e6c240,
TRANSIENT_FAILURE" module=grpc
May 04 15:56:00 ha dockerd[15031]:
time="2021-05-04T15:56:00.863622076-04:00" level=info
msg="pickfirstBalancer: HandleSubConnStateChange: 0x4e6c240, CONNECTING"
module=grpc
dpkg: error processing package docker.io (--configure):
installed docker.io package post-installation script subprocess returned
error exit status 1
Setting up libintl-xs-perl (1.26-2+b3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u7+rpi1) ...
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
Trying to fix the above error failed:
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up docker.io (18.09.1+dfsg1-7.1+rpi1+rpt1) ...
Job for docker.service failed because the control process exited with error
code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
* docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor
preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue
2021-05-04 18:28:21 EDT; 57ms ago
Docs: https://docs.docker.com
Process: 21930 ExecStart=/usr/sbin/dockerd -H fd:// $DOCKER_OPTS
(code=exited, status=1/FAILURE)
Main PID: 21930 (code=exited, status=1/FAILURE)
dpkg: error processing package docker.io (--configure):
installed docker.io package post-installation script subprocess returned
error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then using docker's repositories:
$ curl -fsSL https://get.docker.com -o docker-script.sh
$ sudo sh docker-script.sh
# Executing docker install script, commit:
7cae5f8b0decc17d6571f9f52eb840fbc13b2737
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" |
apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian
buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Sub-process /usr/bin/dpkg returned an error code (1)
Again, trying to fix that error fails:
$ sudo dpkg --configure -a
Setting up docker-ce (5:20.10.6~3-0~raspbian-buster) ...
Job for docker.service failed because the control process exited with error
code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
* docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor
preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue
2021-05-04 21:49:28 EDT; 59ms ago
Docs: https://docs.docker.com
Process: 30828 ExecStart=/usr/bin/dockerd -H fd://
--containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 30828 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce (--configure):
installed docker-ce package post-installation script subprocess returned
error exit status 1
Errors were encountered while processing:
docker-ce
The daemon.log file has the following errors:
May 4 21:54:42 ha dockerd[31316]:
time="2021-05-04T21:54:42.544454629-04:00" level=error msg="failed to mount
overlay: no such device" storage-driver=overlay2
May 4 21:54:42 ha dockerd[31316]:
time="2021-05-04T21:54:42.544687076-04:00" level=error msg="exec:
\"fuse-overlayfs\": executable file not found in $PATH"
storage-driver=fuse-overlayfs
May 4 21:54:42 ha dockerd[31316]:
time="2021-05-04T21:54:42.559568851-04:00" level=error msg="AUFS was not
found in /proc/filesystems" storage-driver=aufs
May 4 21:54:42 ha dockerd[31316]:
time="2021-05-04T21:54:42.579579046-04:00" level=error msg="failed to mount
overlay: no such device" storage-driver=overlay
May 4 21:54:46 ha dockerd[31380]:
time="2021-05-04T21:54:46.795365056-04:00" level=error msg="failed to mount
overlay: no such device" storage-driver=overlay2
May 4 21:54:46 ha dockerd[31380]:
time="2021-05-04T21:54:46.806656946-04:00" level=error msg="exec:
\"fuse-overlayfs\": executable file not found in $PATH"
storage-driver=fuse-overlayfs
May 4 21:54:46 ha dockerd[31380]:
time="2021-05-04T21:54:46.839365954-04:00" level=error msg="AUFS was not
found in /proc/filesystems" storage-driver=aufs
May 4 21:54:46 ha dockerd[31380]:
time="2021-05-04T21:54:46.857892508-04:00" level=error msg="failed to mount
overlay: no such device" storage-driver=overlay
--
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal performance optimization, hosting and consulting.
"Sooner or later, this combustible mixture of ignorance and power is going
to blow up in our faces." -- Dr. Carl Sagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20210504/a1c4c455/attachment.htm>
More information about the kwlug-disc
mailing list