1. 卸载旧版本
yum remove docker \
 docker-client \
 docker-client-latest \
 docker-common \
 docker-latest \
 docker-latest-logrotate \
 docker-logrotate \
 docker-selinux \
 docker-engine-selinux \
 docker-engine

2. 安装依赖包
yum install -y yum-utils \
 device-mapper-persistent-data \
 lvm2

3. 添加yum软件源
yum-config-manager \
 --add-repo \
 http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

4. 安装docker-ce
yum makecache fast
yum install docker-ce

5. 启动
systemctl enable docker
systemctl start docker