阿里云docker镜像源使用


ubuntu:

1、配置Docker加速器:curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -

2、添加mirror:echo "DOCKER_OPTS=\"--registry-mirror=https://kfwkfulq.mirror.aliyuncs.com\"" | sudo tee -a /etc/default/docker

3、重启docker:sudo service docker restart


centos:

1、配置Docker加速器:curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -

2、复制服务:sudo cp -n /lib/systemd/system/docker.service /etc/systemd/system/docker.service

3、添加mirror:sudo sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-mirror=https://kfwkfulq.mirror.aliyuncs.com|g" /etc/systemd/system/docker.service

4、重载:sudo systemctl daemon-reload

5、重启docker:sudo service docker restart

你可能感兴趣的:(阿里云docker镜像源使用)