升级操作系统为Centos7.0以
cat /etc/yum.repos.d/docker-main.repo
[docker-main-repo]
name=Docker main Repository
baseurl=http://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/docker-engine/yum/gpg
yum install -y docker-engine
systemctl start docker
systemctl eanble docker
在阿里云申请一个账号,https://cr.console.aliyun.com/#/accelerator
拷贝您的专属加速器地址,然后/etc/systemd/system/multi-user.target.wants/docker.service 文件
找到 ExecStart= 这一行,在这行最后添加加速器地址 –registry-mirror=<加速器地址>
如:
ExecStart=/usr/bin/dockerd --registry-mirror=https://jxus37ad.mirror.aliyuncs.com