I ran into similar issue found a temp fix on another place.
Temp fix:
sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
A better version which is not temporary:
LXC (or other uses of the cgroups facility) requires the cgroups filesystem to be mounted (see §2.1 in the cgroups kernel documentation). It seems that as of Debian wheezy, this doesn’t happen automatically.
Add the following line to /etc/fstab:
cgroup /sys/fs/cgroup cgroup defaults
For a one-time thing, mount it manually:
mount -t cgroup cgroup /sys/fs/cgroup
Abridged to this docker problem
Create this folder
sudo mkdir /sys/fs/cgroup/systemd
Mount it
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
add this to your /etc/fstab
cgroup /sys/fs/cgroup/systemd cgroup defaults
Reboot
ps: There is still the issue where the created folder /sys/fs/cgroup/systemd gets deleted after reboot.
Creating a simple on start task with systemd that checks the folder and mounts it could be a solution but feels wrong.
Will investigate if there is a better solution.
Since part of my job is development with docker I do not want to make another switch.
I remember 2-3 years ago when I started forcing my coworkers running projects in docker.
And yes it was literally force.
I was sick of 'But with my PHP/Apache/NGINX (place software X here) version it worked!'
Not to mention CI/CD and automated testing with docker. yada yada
I know that I could replace my local docker with podman, but I imagine some of my coworker will come to me with some docker problem and if I tell them 'Ohh I use podman now' they will strangle me right then and there.
But for another user which has no need to stick with a specific software this could be a good solution.
I am having the same issue, this solution didn't work for me.
I'm a linux noob so I figure I am doing something wrong?
cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=70A3-BF56 /boot/efi vfat umask=0077 0 2
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 / btrfs subvol=@,defaults,noatime,space_cache,autodefrag,compress=zstd 0 1
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 /home btrfs subvol=@home,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 /root btrfs subvol=@root,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 /srv btrfs subvol=@srv,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 /var/cache btrfs subvol=@cache,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 /var/log btrfs subvol=@log,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=c1fc10ac-4c60-4f06-a718-ce838e6d1146 /var/tmp btrfs subvol=@tmp,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=c1ed9087-3378-4246-94ca-524fbf79a5f1 swap swap defaults,noatime 0 0
cgroup /sys/fs/cgroup/systemd cgroup defaults