docker镜像使用阿里docker镜像加速器的配置方法,以及非docker仓库镜像的加速方法,需要有一个阿里云账号。
阿里docker镜像仓库
阿里云控制台->容器镜像服务->镜像加速器
https://cr.console.aliyun.com/cn-shanghai/instances/mirrors
通过修改daemon配置文件/etc/docker/daemon.json来使用加速器
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://xxxxxxx.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
如果需要对非docker仓库的镜像执行加速,参考如下链接:
https://cs.xieyonghui.com/container/docker-image-building_169.html