yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
2.需要的安装包:
yum install -y yum-utils
3.设置镜像的仓库:
yum-config-manager \ --add-repo \ https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新yum软件包索引:
yum makecache fast
4.安装docker:
yum install docker-ce docker-ce-cli containerd.io
5.启动docker:
systemctl start docker
6.使用docker version查看是否启动成功; 卸载docker: 1.卸载依赖:
yum remove docker-ce docker-ce-cli containerd.io
2.删除资源:
rm -rf /var/lib/docker rm -rf /var/lib/containerd