1. 卸载旧版本
root@master docker]# rpm -qa | grep docker docker-1.13.1-208.git7d71120.el7_9.x86_64 docker-client-1.13.1-208.git7d71120.el7_9.x86_64 docker-common-1.13.1-208.git7d71120.el7_9.x86_64 [root@master docker]# yum remove -y docker-1.13.1-208.git7d71120.el7_9.x86_64 docker-client-1.13.1-208.git7d71120.el7_9.x86_64 docker-common-1.13.1-208.git7d71120.el7_9.x86_64
2. 安装最新版本
[root@master docker]# curl -fsSL https://get.docker.com/ | sh
3. 重启docker
[root@master containers]# systemctl daemon-reload [root@master containers]# systemctl restart dockerw
4. 版本查看
[root@master containers]# docker version
5. 问题处理
docker 升级之后 以前的容器无法重启问题
cd /var/lib/docker/containers
grep -rl 'docker-runc' /var/lib/docker/containers/ | xargs sed -i 's/docker-runc/runc/g'
systemctl restart docker