admin管理员组文章数量:1544843
Windows Docker配置国内镜像源的两种方法
更新时间 2022.04.14
通过Docker-Desktop界面操作和修改daemon.json两种方法配置国内镜像源
方法一:通过Docker-Desktop配置
- 点击设置
- 选择 Docker Engine
- 添加以下源地址
"registry-mirrors": [
"https://docker.mirrors.ustc.edu",
"https://registry.docker-cn",
"http://hub-mirror.c.163",
"https://mirrors.tencentyun"
]
- 应用并重启Docker
方法二:通过daemon.json配置
以我本机使用 Administrator 账户为例,配置文件位于 C:\Users\Administrator\.docker\
目录下的daemon.json
修改配置文件,添加国内源地址
打开daemon.json文件,并添加以下源地址
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"features": {
"buildkit": true
},
"registry-mirrors": [
"https://docker.mirrors.ustc.edu",
"https://registry.docker-cn",
"http://hub-mirror.c.163",
"https://mirrors.tencentyun"
]
}
如果已经存在registry-mirrors
替换内容即可
- 点击Troubleshoot
- 点击Restart
版权声明:本文标题:Windows Docker 配置国内镜像源的两种方法 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1727147236a1099342.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论