- 添加源
1 | sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo |
- 升级
1 | sudo dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm |
- 安装
1 | sudo dnf -y install docker-ce |
- 确认安装成功
1 | sudo systemctl status docker |
1 | sudo systemctl start docker |
1 | sudo systemctl enable docker |
参考:
https://bynss.com/2019/292681.html
https://www.cnblogs.com/Zhusi/p/12324516.html