解决Fedora31上docker启动报错 open /sys/fs/cgroup/docker/cpuset.cpus.effective: no such file or directory

$ sudo dnf install -y grubby
$ sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
$ sudo reboot
[yeqiang@localhost ~]$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
mysql               latest              c8ee894bd2bd        3 weeks ago         456MB

[yeqiang@localhost ~]$ docker run -it mysql:latest /bin/bash
root@18086f8be919:/# exit
[yeqiang@localhost ~]$ 

原因:

Fedora 31 使用cgroup v2,这个版本的cgroup跟目前的docker兼容性不好。

发布了161 篇原创文章 · 获赞 39 · 访问量 36万+

猜你喜欢

转载自blog.csdn.net/hknaruto/article/details/103032203