卸载旧版Docker
新版docker无法覆盖旧版的,所以需要先卸载原来的旧版本
yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-selinux \docker-engine-selinux \docker-engine
安装Docker依赖
yum install -y yum-utils device-mapper-persistent-data lvm2
安装Docker
yum install -y docker
查看docker版本
docker -v
启动docker
# 启动docker
systemctl start docker
# dockerk开机自启
systemctl enable docker