wget -O /etc/yum.repos.d/CentOS-base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
安装epel源yum install epel-release
安装docker依赖包yum install container-selinux
添加docker安装源yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum repolist
sudo sed -i ‘s+download.docker.com+mirrors.aliyun.com/docker-ce+’ /etc/yum.repos.d/docker-ce.repo
yum makecache fast
yum list docker-ce --showduplicates | sort -r
yum install docker-ce
systemctl start docker
systemctl status docker
用ifconfig查看网络连接,多了一个docker0的网络接口
docker安装并且启动成功



