Installing docker on Fedora 31

Dishant Pandya
2 min readSep 20, 2019

A few days ago Fedora 31 was released and we are all excited to try it out, you can install docker-ce on it by simple following the steps given in docker documention, or by following the steps given below. But even after the installation running the docker container will throw some error as follows:

docker run --rm -it alpine sh
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.

This is beacaue Fedora 31 uses cgroups v2 by default and docker doesn’t yet support cgroupsv2, which may be added soon as docker is most used container runtime. In this tutorial I am going to show you how to install docker and change cgroups to v1 as a quick fix to run docker. So Let’s go.

  1. Add Docker repo.
sudo dnf config-manager \
--add-repo \

2. Install docker.

sudo dnf -y install docker-ce

this will install docker-ce and all its dependencies

Optionally , configure docker to be run by non-root user.

sudo groupadd dockersudo usermod -aG docker $USER

3. Change Kernel Boot Options.

Open default grub config.

sudo gedit /etc/default/grub

Now in to the line starting with GRUB_CMDLINE_LINUX, add the parameter systemd.unified_cgroup_hierarchy=0 as shown below and save it.

Now update the grub by running grub2-mkconfig, and reboot the system on success.

sudo grub2-mkconfig

And now you have docker installed and running on your Fedora 31.

Thank you.



Dishant Pandya

Platform Engineer @Kotak811. Building handcrafted solutions to meet high velocity application development.