CentOS 7
tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF
yum -y install docker-engine systemctl enable docker.service systemctl start docker
转载于:https://blog.51cto.com/fengwan/1865843