CentOS7配置Docker镜像加速器
1. 将默认的配置文件复制出来
cp -n /lib/systemd/system/docker.service /etc/systemd/system/docker.service
2. 将加速器地址添加到配置文件的启动命令
sudo sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-
mirror=https://gbpursha.mirror.aliyuncs.com|g" /etc/systemd/system/docker.service
sudo systemctl daemon-reload
3. 重启Docker
sudo service docker restart