卸载旧版Docker
新版docker无法覆盖旧版的,所以需要先卸载原来的旧版本
java
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依赖
java
yum install -y yum-utils device-mapper-persistent-data lvm2
安装Docker
java
yum install -y docker
查看docker版本
java
docker -v
启动docker
java
# 启动docker
systemctl start docker
# dockerk开机自启
systemctl enable docker