Hi, I am trying Alpine Linux with Docker (rootless). Alpine comes with OpenRC and not systemd by default.
I get conflicting information, maybe because some of it is out of date. Essentially, current setup works, I have:
- Docker in rootless mode running with standard user
- Docker compose is also running OK, with containers being in healthy state for days now, it is very stable
The only problem is I have no way to limit the containers CPU and memory use. I just want to confirm if systemd is a strict requirement. From the warning message below, it appears that Docker is not detecting cgroups.
Attaching few bits from my device:
~ cat /etc/rc.conf | grep unified
# "hybrid" mounts cgroups version 2 on /sys/fs/cgroup/unified and
# "unified" mounts cgroups version 2 on /sys/fs/cgroup
rc_cgroup_mode="unified"
~ mount | grep cgroup
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
~ docker info | grep Cgroup
WARNING: Running in rootless-mode without cgroups. Systemd is required to enable cgroups in rootless-mode.
Cgroup Driver: none
Cgroup Version: 2
~ docker stats
ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
8ac903c57668 wikijs 2.69% 0B / 0B 0.00% 3.79MB / 2.52MB 715MB / 0B 310