For setting up Docker on Fedora 31, I used the documentation found here: https://docs.docker.com/install/linux/docker-ce/fedora/
Following problems occured:
1. Url to Docker repo seems to be wrong
Documentation mention to add https://download.docker.com/linux/fedora/docker-ce.repo as repo. With this, errors occur and docker-ce could not be installed. I had to use the following url, with this I could install it: https://download.docker.com/linux/fedora/31/x86_64/stable
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/31/x86_64/stable
2. Error while executing docker run
After installation I tried Docker with the default example:
sudo docker run hello-world
Instead of showing the expected output it showed me the 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.
After searching around I found on bug mention the same error: https://github.com/microsoft/vscode-docker/issues/1402
In there it was pointing to a solution: https://fedoraproject.org/wiki/Common_F31_bugs#Docker_package_no_longer_available_and_will_not_run_by_default_.28due_to_switch_to_cgroups_v2.29
sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
Problem is, that with Fedora 31 Cgroups v2 was enabled while Docker still uses Cgroups v1.