yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum list --showduplicates docker-ce
yum -y install docker-ce-17.12.1.ce-1.el7.centos
https://docs.docker.com/install/linux/docker-ce/centos/
原文:https://www.cnblogs.com/ka1em/p/11299087.html