Fedora has switched to cgroups v2 by default now, but Docker doesn’t yet support it and so fails to start. If you want to use Docker then you need to revert cgroups to v1 by adding the systemd.unified_cgroup_hierarchy=0
kernel argument.
Add systemd.unified_cgroup_hierarchy=0
to the default GRUB config with sed.
sudo sed -i '/^GRUB_CMDLINE_LINUX/ s/"$/ systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
Now rebuild your GRUB config.
If you’re using BIOS boot then it’s this.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
If you’re running EFI, then it’s this.
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Now reboot and make sure Docker can start!
4 thoughts on “Enabling Docker in Fedora 31 by reverting to cgroups v1”
Thank you for this useful post, I confirm it worked fine for me on F31. The post from Dan Walsh has more information on the change: https://www.redhat.com/sysadmin/fedora-31-control-group-v2
As a sidenote, you can call ‘sudo efibootmgr’ to see if you are booting under EFI (it will dump out EFI variables if you do).
Thanks Vincent.
Thank you! Worked like a charm!
I tried this and it would not change to only use cgroups v1.
grep cgroup /proc/filesystems
nodev cgroup
nodev cgroup2