How To Make Docker Work On Fedora OS 31 With CGroups V2?

Sivakumar V

52 sec read

My friends think me I use Ubuntu but predominantly I use Fedora. Noting Fedora 31 is released, I quickly upgraded from 30 to 31. Just after upgrade none of my Docker applications were working.

As a vivid DevOps developer, I use Docker for all my development works and I got shocked to know CGroups V2 was not supported by Docker. I got the below error:

ERROR: for app_service_1  Cannot start service service_name: 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

Cgroups v2 is awesome and it got cool features and it’s not supported by Docker, it may be supported in near future. I was looking for the solution and found two ways . As you all know, CGroups V2 is an awesome tool and I felt limbo when I got to know it’s not supported by Docker. Don’t worry, I got two solutions for you. They are:

  1. Revert to Cgroups V1
  2. Use Podman and Buildah

I went with second solution as the Podman and Buidah combo can create OCI supported images

If you want, you can revert to CGroups V1 with the following commands

sudo dnf install -y grubby && \
  sudo grubby \
  --update-kernel=ALL \

I got this solution from this medium blog

Thanks for reading

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *