Fresh install Docker cgroup mountpoint does not exist

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.

5 Likes