Search Suggest

How To Install Docker On Fedora 32 Or 31 (And Alternatives)

Fedora logo

Fedora 31 switched to cgroup v2, being the first major Linux distribution to do so. Docker doesn't support cgroup v2 though, so it doesn't work on the latest Fedora release. This article explains your options, and how to install Docker on Fedora 31 if you don't like the alternatives. [[Edit] This was originally for Fedora 31, but everything in this article also applies for Fedora 32; there's no Docker CE repository for Fedora 32, but we'll use the Fedora 31 repository instead.

cgroup (control group) is a Linux kernel feature that organizes processes hierarchically and distributes system resources along the hierarchy in a controlled and configurable manner. cgroup v2 first appeared in Linux kernel 4.5, and unlike v1, it only has a single process hierarchy and discriminates between processes, not threads. I recommend reading this article on Fedora 31 and control group v2.

Since Fedora 31 (and Fedora 32) switched to cgroups v2, Docker no longer works. For example, this error pops up on my Fedora 31 system when trying to run a container using Docker:

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.

On Fedora 32 I get this error instead:

docker: Error response from daemon: cgroups: cgroup mountpoint does not exist: unknown.

So what can you do now that Fedora 32 and 31 use cgroups v2, and Docker no longer works? You'll find some options below, including a workaround for installing Docker CE. As usual, all instructions were tested before posting them on Linux Uprising.

Đăng nhận xét