Running Docker on Fedora 31 - revert systemd configuration to use cgroup v1

Published on Author admin

Fedora 31 is first major distro with cgroup v2 (unified hierarchy). Follow below steps to make Docker working on it:

Add Docker CE repository:

sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo

Install Docker CE:

sudo dnf install docker-ce

When you try to run Docker container on freshly installed Fedora 31, you will get following error message:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:297: applying cgroup configuration for process caused "open /sys/fs/cgroup/docker/cpuset.cpus.effective: no such file or directory"": unknown.

Revert the systemd configuration to use cgroup v1, edit default Grub config file:

sudo gedit /etc/default/grub

Append line starting with GRUB_CMDLINE_LINUX with systemd.unified_cgroup_hierarchy=0 parameter.

After that rebuild Grub config and then reboot.

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg