So changed the IP Tables to legacy per this thread Can't install docker - #6 by Muenzi, I managed to manually install a Debian version of Docker. The script seems to want to install a Raspbian version
Just adding a “me too” so I’m on this thread – I hit the same issue immediately after upgrading to Bullseye. I was hoping to finally drop Docker for Podman but got similar looking errors with Podman too. Best guess at this point is something missing from the kernel. Still investigating; will report back if I figure anything out.
Also, just to note: I have a Docker apt source in my /etc/apt/sources.list.d that I think was originally set up by the Docker installation script:
$ cat /etc/apt/sources.list.d/download_docker_com_linux_debian.list
deb https://download.docker.com/linux/debian bullseye stable
$ dpkg -l docker-ce docker-ce-cli
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-==============================-============-========================================================
ii docker-ce 5:20.10.18~3-0~debian-bullseye armhf Docker: the open-source application container engine
ii docker-ce-cli 5:20.10.18~3-0~debian-bullseye armhf Docker CLI: the open-source application container engine
If so – in a couple of days (bit busy right now), I can try and install Docker on a Vero and see what’s up. From what I remember last time, the installation script was treating OSMC as a Raspbian variant in error.
A few Google searches later and I think I’ve tracked it down to the Bullseye version of runc wanting to use “cgroup v2”, which requires kernel version 4.15 or later according to this documentation.
Kernel
Recommended version: 5.2 or later
Minimum version: 4.15
Kernel older than 5.2 is not recommended due to lack of freezer.
Notably, kernel older than 4.15 MUST NOT be used (unless you are running containers with user namespaces), as it lacks support for controlling permissions of devices.
OSMC ships kernel 4.9.
Take this with a grain of salt as cgroup technical minutae is far out of my wheelhouse, but it’s a lead.
I took a bit of time this evening to sit down with the stable release and try and reproduce the problem. Here’s what I did:
First, run
sudo update-alternatives --config iptables
and select Option 1.
Now, grab the Docker script:
wget https://get.docker.com/ -O docker.sh
It’s wrong – and thinks OSMC is Raspbian based. It’s not, so I made this change. I don’t think this is absolutely essential – but we might as well have a proper armhf version of Docker.
I then ran the script which installed Docker and can see it’s running:
root@osmc:/home/osmc# systemctl status docker
â—Ź docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-09-21 19:43:39 GMT; 2min 25s ago
TriggeredBy: â—Ź docker.socket
Docs: https://docs.docker.com
Main PID: 4414 (dockerd)
Tasks: 10
Memory: 13.8M
CGroup: /system.slice/docker.service
└─4414 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.417015662Z" level=info msg="[graphdriver] using prior storage driver: overlay2"
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.425027661Z" level=warning msg="Unable to find cpu controller"
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.425150288Z" level=warning msg="Unable to find cpuset controller"
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.426372605Z" level=info msg="Loading containers: start."
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.574901497Z" level=info msg="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"
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.744922665Z" level=info msg="Loading containers: done."
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.856523463Z" level=info msg="Docker daemon" commit=e42327a graphdriver(s)=overlay2 version=20.10.18
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.857099599Z" level=info msg="Daemon has completed initialization"
Sep 21 19:43:39 osmc systemd[1]: Started Docker Application Container Engine.
Sep 21 19:43:39 osmc dockerd[4414]: time="2022-09-21T19:43:39.995135359Z" level=info msg="API listen on /run/docker.sock"
I then tried to run a container after disabling Systemd 248 cgroup v2:
docker run hello-world
and got:
root@osmc:/home/osmc# docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(arm32v7)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
I’ll make the necessary change available shortly.
Run the following command to add the staging repository: echo 'deb http://apt.osmc.tv bullseye-devel main' | sudo tee /etc/apt/sources.list.d/osmc-devel.list
Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
Your system should have have received the update.
Please see if the issue is resolved.
I also recommend you remove /etc/apt/sources.list.d/osmc-devel.list after updating.
This will deactivate the staging repository. You can do so with the following command: sudo rm /etc/apt/sources.list.d/osmc-devel.list.
Please note that we will automatically disable this update channel after 14 days on your device in case you forget to do so to ensure that your system reverts to the stable update channel.