MacOS上配置docker国内镜像仓库地址
•
移动开发
背景
docker官方镜像仓库网速较差,我们需要设置国内镜像服务
我的MacOS docker版本如下

设置docker国内镜像仓库地址

- 点击Settings
- 点击Docker Engine
- 修改配置文件,添加registry-mirrors
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"data-root": "/var/lib/docker",
"experimental": false,
"features": {
"buildkit": true
},
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn/",
"https://hub-mirror.c.163.com/",
"https://registry.docker-cn.com/"
]
}
其他参考
参考阿里云的镜像加速文档:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
上述链接需要登录阿里云账号获取专属用户的镜像加速器地址

可将该地址也配置到registry-mirrors
本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/e9fa0fb083.html
