# 安装依赖包
yum install -y yum-utils device-mapper-persistent-data lvm2
# 添加Docker软件包源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 更新yum包索引
yum makecache fast
# 安装Docker CE
yum install docker-ce
# 启动
systemctl start docker
systemctl enable docker
# 卸载
yum remove docker-ce
rm -rf /var/lib/docker
原文地址:http://blog.51cto.com/10880347/2327247
时间: 2024-10-10 02:51:33