Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] Docker on RK3566 ubuntu 20.04

42

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
42

【Linux】 Docker on RK3566 ubuntu 20.04

Posted at 11/10/2021 21:58:20      View:3007 | Replies:9        Print      Only Author   [Copy Link] 1#
I am trying to install docker on my RK3566. I've been trying to get this working for weeks. I can't seem to do it, so I hope to find help here. I am now running the latest firmware ubuntu 20.04
This is the result after sudo dockerd:

INFO[2021-11-09T12:50:08.951270122Z] Starting up                                 
INFO[2021-11-09T12:50:08.953969629Z] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2021-11-09T12:50:08.956234531Z] parsed scheme: "unix"                         module=grpc
INFO[2021-11-09T12:50:08.956366079Z] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2021-11-09T12:50:08.956478376Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2021-11-09T12:50:08.956549546Z] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2021-11-09T12:50:08.960274020Z] parsed scheme: "unix"                         module=grpc
INFO[2021-11-09T12:50:08.960383109Z] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2021-11-09T12:50:08.960465946Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2021-11-09T12:50:08.960513490Z] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2021-11-09T12:50:09.022254757Z] [graphdriver] using prior storage driver: overlay2
WARN[2021-11-09T12:50:09.027864073Z] Your kernel does not support cgroup memory limit
WARN[2021-11-09T12:50:09.027959452Z] Your kernel does not support CPU realtime scheduler
WARN[2021-11-09T12:50:09.027992995Z] Your kernel does not support cgroup blkio weight
WARN[2021-11-09T12:50:09.028024497Z] Your kernel does not support cgroup blkio weight_device
WARN[2021-11-09T12:50:09.028054540Z] Your kernel does not support cgroup blkio throttle.read_bps_device
WARN[2021-11-09T12:50:09.028085750Z] Your kernel does not support cgroup blkio throttle.write_bps_device
WARN[2021-11-09T12:50:09.028115793Z] Your kernel does not support cgroup blkio throttle.read_iops_device
WARN[2021-11-09T12:50:09.028146128Z] Your kernel does not support cgroup blkio throttle.write_iops_device
WARN[2021-11-09T12:50:09.028175879Z] Unable to find pids cgroup in mounts         
INFO[2021-11-09T12:50:09.028838287Z] Loading containers: start.                  
WARN[2021-11-09T12:50:09.035265768Z] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/4.19.193
modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.19.193
, error: exit status 1
WARN[2021-11-09T12:50:09.238487739Z] Could not load necessary modules for Conntrack: Running modprobe nf_conntrack failed with message: `modprobe: WARNING: Module nf_conntrack not found in directory /lib/modules/4.19.193`, error: exit status 1
INFO[2021-11-09T12:50:09.239232400Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2021-11-09T12:50:09.302080888Z] stopping event stream following graceful shutdown  error="<nil>" module=libcontainerd namespace=moby
failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wai
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 11/19/2021 17:06:39        Only Author  2#
Try it with Station M2 firmware.

https://www.stationpc.com/
Reply

Use props Report

42

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
42
Posted at 11/21/2021 01:14:37        Only Author  3#
Tnx for the reply,
But I get the same result. It seems that kernel modules are missing . I have to do something with modprobe and need the kernel modules but can't find them anywhere. Am unfortunately a layman in linux land. I'm afraid I'll have to go back to a raspberry PI.
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 11/22/2021 10:40:31        Only Author  4#
adriaanvn Posted at 11/21/2021 01:14
Tnx for the reply,
But I get the same result. It seems that kernel modules are missing . I have to ...

We will check it.
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 11/22/2021 11:23:47        Only Author  5#
adriaanvn Posted at 11/21/2021 01:14
Tnx for the reply,
But I get the same result. It seems that kernel modules are missing . I have to ...

Have you installed docker according to the tutorial? https://docs.docker.com/engine/install/ubuntu/

root@firefly:~# systemctl status docker
��● docker.service-Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-11-22 03:14:41 UTC; 6s ago
TriggeredBy: ��● docker.socket
       Docs: https://docs.docker.com
   Main PID: 667 (dockerd)
      Tasks: 9
     Memory: 95.1M
     CGroup: /system.slice/docker.service
              ��└��─667 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

root@firefly:~# lsmod
Module Size Used by
ipt_MASQUERADE 16384 1
nf_conntrack_netlink 40960 0
nfnetlink 16384 2 nf_conntrack_netlink
xfrm_user 32768 1
xfrm_algo 16384 1 xfrm_user
iptable_nat 16384 1
nf_nat_ipv4 16384 2 ipt_MASQUERADE,iptable_nat
nf_nat 49152 1 nf_nat_ipv4
br_netfilter 24576 0
bridge 143360 1 br_netfilter
stp 16384 1 bridge
...

Everything seems normal. Did you make any other changes? What was your specific operation and where did the abnormality occur?
Reply

Use props Report

42

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
42
Posted at 11/22/2021 19:09:11        Only Author  6#
Thans for the reply. This gives hope that it can work.  I have tried several installations of docker. To be clear i have installed the firmware again, from there i have follow the instructions in the link you have send. This is the result (last steps):

firefly@firefly:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency  tree
Reading state information... Done
The following additional packages will be installed:
apparmor docker-ce-rootless-extras git git-man liberror-perl pigz
slirp4netns
Suggested packages:
apparmor-profiles-extra apparmor-utils cgroupfs-mount | cgroup-lite
gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el
git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
apparmor containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras
git git-man liberror-perl pigz slirp4netns
0 upgraded, 10 newly installed, 0 to remove and 109 not upgraded.
Need to get 78.5 MB of archives.
After this operation, 372 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu focal/stable arm64 containerd.io arm64 1.4.12-1 [16.8 MB]
Get:2 http://mirrors.aliyun.com/ubuntu-ports focal/universe arm64 pigz arm64 2.4-1 [47.8 kB]
Get:3 https://download.docker.com/linux/ubuntu focal/stable arm64 docker-ce-cli arm64 5:20.10.11~3-0~ubuntu-focal [34.7 MB]
Get:4 http://mirrors.aliyun.com/ubuntu-ports focal-updates/main arm64 apparmor arm64 2.13.3-7ubuntu5.1 [455 kB]
Get:5 http://mirrors.aliyun.com/ubuntu-ports focal/main arm64 liberror-perl all 0.17029-1 [26.5 kB]
Get:6 http://mirrors.aliyun.com/ubuntu-ports focal-updates/main arm64 git-man all 1:2.25.1-1ubuntu3.2 [884 kB]
Get:7 https://download.docker.com/linux/ubuntu focal/stable arm64 docker-ce arm64 5:20.10.11~3-0~ubuntu-focal [14.0 MB]
Get:8 http://mirrors.aliyun.com/ubuntu-ports focal-updates/main arm64 git arm64 1:2.25.1-1ubuntu3.2 [4344 kB]
Get:9 https://download.docker.com/linux/ubuntu focal/stable arm64 docker-ce-rootless-extras arm64 5:20.10.11~3-0~ubuntu-focal [7175 kB]
Get:10 http://mirrors.aliyun.com/ubuntu-ports focal/universe arm64 slirp4netns arm64 0.4.3-1 [69.2 kB]
Fetched 78.5 MB in 4s (21.7 MB/s)
Preconfiguring packages ...
Selecting previously unselected package pigz.
(Reading database ... 151937 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_arm64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package apparmor.
Preparing to unpack .../1-apparmor_2.13.3-7ubuntu5.1_arm64.deb ...
Unpacking apparmor (2.13.3-7ubuntu5.1) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../2-containerd.io_1.4.12-1_arm64.deb ...
Unpacking containerd.io (1.4.12-1) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../3-docker-ce-cli_5%3a20.10.11~3-0~ubuntu-focal_arm64.deb ...
Unpacking docker-ce-cli (5:20.10.11~3-0~ubuntu-focal) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../4-docker-ce_5%3a20.10.11~3-0~ubuntu-focal_arm64.deb ...
Unpacking docker-ce (5:20.10.11~3-0~ubuntu-focal) ...
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../5-docker-ce-rootless-extras_5%3a20.10.11~3-0~ubuntu-focal_arm64.deb ...
Unpacking docker-ce-rootless-extras (5:20.10.11~3-0~ubuntu-focal) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../6-liberror-perl_0.17029-1_all.deb ...
Unpacking liberror-perl (0.17029-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../7-git-man_1%3a2.25.1-1ubuntu3.2_all.deb ...
Unpacking git-man (1:2.25.1-1ubuntu3.2) ...
Selecting previously unselected package git.
Preparing to unpack .../8-git_1%3a2.25.1-1ubuntu3.2_arm64.deb ...
Unpacking git (1:2.25.1-1ubuntu3.2) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../9-slirp4netns_0.4.3-1_arm64.deb ...
Unpacking slirp4netns (0.4.3-1) ...
Setting up slirp4netns (0.4.3-1) ...
Setting up liberror-perl (0.17029-1) ...
Setting up apparmor (2.13.3-7ubuntu5.1) ...
Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.
Setting up containerd.io (1.4.12-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up docker-ce-cli (5:20.10.11~3-0~ubuntu-focal) ...
Setting up pigz (2.4-1) ...
Setting up git-man (1:2.25.1-1ubuntu3.2) ...
Setting up docker-ce-rootless-extras (5:20.10.11~3-0~ubuntu-focal) ...
Setting up docker-ce (5:20.10.11~3-0~ubuntu-focal) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
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 Mon 2021-11-22 09:45:14 UTC; 21ms ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 7696 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 7696 (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
Setting up git (1:2.25.1-1ubuntu3.2) ...
Processing triggers for systemd (245.4-4ubuntu4.0firefly1) ...
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

firefly@firefly:~$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
firefly@firefly:~$
firefly@firefly:~$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-11-22 10:03:36 UTC; 44s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 1089 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAIL>
Main PID: 1089 (code=exited, status=1/FAILURE)
Nov 22 10:03:36 firefly systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Nov 22 10:03:36 firefly systemd[1]: Stopped Docker Application Container Engine.
Nov 22 10:03:36 firefly systemd[1]: docker.service: Start request repeated too quickly.
Nov 22 10:03:36 firefly systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 22 10:03:36 firefly systemd[1]: Failed to start Docker Application Container Engine.

firefly@firefly:/lib/systemd$ sudo dockerd
INFO[2021-11-22T10:08:45.329972187Z] Starting up
INFO[2021-11-22T10:08:45.332549370Z] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2021-11-22T10:08:45.334581425Z] parsed scheme: "unix" module=grpc
INFO[2021-11-22T10:08:45.334715592Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-11-22T10:08:45.334805426Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-11-22T10:08:45.334849760Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-11-22T10:08:45.338750826Z] parsed scheme: "unix" module=grpc
INFO[2021-11-22T10:08:45.338863118Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-11-22T10:08:45.338982994Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-11-22T10:08:45.339034328Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-11-22T10:08:45.395058890Z] [graphdriver] using prior storage driver: overlay2
WARN[2021-11-22T10:08:45.400113214Z] Your kernel does not support cgroup memory limit
WARN[2021-11-22T10:08:45.400203339Z] Your kernel does not support CPU realtime scheduler
WARN[2021-11-22T10:08:45.400228131Z] Your kernel does not support cgroup blkio weight
WARN[2021-11-22T10:08:45.400251465Z] Your kernel does not support cgroup blkio weight_device
WARN[2021-11-22T10:08:45.400287048Z] Your kernel does not support cgroup blkio throttle.read_bps_device
WARN[2021-11-22T10:08:45.400317674Z] Your kernel does not support cgroup blkio throttle.write_bps_device
WARN[2021-11-22T10:08:45.400341299Z] Your kernel does not support cgroup blkio throttle.read_iops_device
WARN[2021-11-22T10:08:45.400370174Z] Your kernel does not support cgroup blkio throttle.write_iops_device
WARN[2021-11-22T10:08:45.400400216Z] Unable to find pids cgroup in mounts
INFO[2021-11-22T10:08:45.401045095Z] Loading containers: start.
WARN[2021-11-22T10:08:45.406576588Z] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/4.19.193
modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.19.193
, error: exit status 1
WARN[2021-11-22T10:08:45.584499046Z] Could not load necessary modules for Conntrack: Running modprobe nf_conntrack failed with message: `modprobe: WARNING: Module nf_conntrack not found in directory /lib/modules/4.19.193`, error: exit status 1
INFO[2021-11-22T10:08:45.585364719Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2021-11-22T10:08:45.649108580Z] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables v1.8.4 (legacy): Couldn't load match `addrtype':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
(exit status 2)
Reply

Use props Report

42

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
42
Posted at 11/22/2021 19:17:34        Only Author  7#
The command you use returns this result
sudo /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
INFO[2021-11-22T11:14:03.381513264Z] Starting up
failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd
Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 11/23/2021 10:34:14        Only Author  8#
adriaanvn Posted at 11/22/2021 19:09
Thans for the reply. This gives hope that it can work.  I have tried several installations of docker ...

I am afraid we are not using the same firmware, I am using this `Station_M2_Ubuntu_20.04_GPT_20211109_0910.img`.

Please check your system:
ls /lib/modules/
cat /proc/version
Reply

Use props Report

42

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
42
Posted at 11/24/2021 18:45:30        Only Author  9#
Thanks it works,
I saw that the modules directory was not present on my system. Just to be on the safe side, I reinstalled the system with the firmware again with the version you provided and from the link you gave in your first reply. Had allready downloaded this and also thought I was running it.  Now I don't get any error messages. And docker version shows that version 20.20.11 is running. Apparently I flashed the wrong img file. Thank you again very much.
Reply

Use props Report

14

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
14
Posted at 7/26/2022 22:51:08        Only Author  10#
adriaanvn Posted at 11/24/2021 18:45
Thanks it works,
I saw that the modules directory was not present on my system. Just to be on the  ...

Hi Firefly Support,

I'm having the same issue with installing Docker/ Ubuntu 20.04 LTS.
Board RK-3566 PC with firmware ROC-RK3566-PC-UBUNTU20.04-GPT-20211216-1031.
This firmware is missing some modules, which prevent the correct installation of Docker.
Example:
modprobe: WARNING: Module br_netfilter not found in directory /lib/modules
Is there a possibility of adding these modules to this firmware?
Thanks
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list