Error running docker on aarm64 arch linux (Manjaro on Pinephone)

Hello,

I am running into an error when launching docker on Manjaro Linux. I read on some other forums that it might be an issue with cgroup v2. Not sure how to fix this.

INFO[2022-01-06T10:06:59.267970912-08:00] shim disconnected                             id=6c95e631b40d83a9868b724490b14eedb608c646f1edbb292fe2806f0af75597
WARN[2022-01-06T10:06:59.268656611-08:00] cleaning up after shim disconnected           id=6c95e631b40d83a9868b724490b14eedb608c646f1edbb292fe2806f0af75597 namespace=moby
INFO[2022-01-06T10:06:59.268802359-08:00] cleaning up dead shim
WARN[2022-01-06T10:06:59.370041508-08:00] cleanup warnings time="2022-01-06T10:06:59-08:00" level=info msg="starting signal loop" namespace=moby pid=4966
ERRO[2022-01-06T10:06:59.373118051-08:00] copy shim log                                 error="read /proc/self/fd/13: file already closed"
ERRO[2022-01-06T10:06:59.376856045-08:00] stream copy error: reading from a closed fifo
ERRO[2022-01-06T10:06:59.377685784-08:00] stream copy error: reading from a closed fifo
WARN[2022-01-06T10:06:59.421226054-08:00] Failed to delete conntrack state for 172.17.0.2: invalid argument
ERRO[2022-01-06T10:06:59.537262095-08:00] 6c95e631b40d83a9868b724490b14eedb608c646f1edbb292fe2806f0af75597 cleanup: failed to delete container from containerd: no such container
ERRO[2022-01-06T10:06:59.537450884-08:00] Handler for POST /v1.41/containers/6c95e631b40d83a9868b724490b14eedb608c646f1edbb292fe2806f0af75597/start returned error: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown

Docker version

Client:
 Version:           20.10.11
 API version:       1.41
 Go version:        go1.17.3
 Git commit:        dea9396e18
 Built:             Sat Nov 20 14:08:33 2021
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.11
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.3
  Git commit:       847da184ad
  Built:            Sat Nov 20 14:08:02 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.5.8
  GitCommit:        1e5ef943eb76627a6d3b6de8cd1ef6537f393a71.m
 runc:
  Version:          1.0.3
  GitCommit:        v1.0.3-0-gf46b6ba2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

You can recreate the error with

docker run alpine

Thank you for your help

Hi

its correct that its because of cgroup v2, if its not possible to upgrade your kernel to a version equal or more than 4.15 , you can try and add this to: /boot/cmdline.txt

systemd.unified_cgroup_hierarchy=0

and reboot