docker默認(rèn)的源為國外官方源,下載速度較慢,可改為國內(nèi)源
方案一
修改或新增 docker默認(rèn)的配置文件 vim /etc/docker/daemon.json
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"features": {
"buildkit": true
},
"registry-mirrors": [
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com"
]
}
# 重啟docker
service docker restart
# 查看是否成功
docker info
方案二
修改或新增 vim /etc/sysconfig/docker
# 在OPTIONS變量后追加參數(shù) --registry-mirror=https://docker.mirrors.ustc.edu.cn
OPTIONS='--selinux-enabled --log-driver=journald --registry-mirror=https://docker.mirrors.ustc.edu.cn'
方案三
阿里云docker鏡像加速,提升pull的速度
?
文章來源:http://www.zghlxwxcb.cn/news/detail-780341.html
?Docker國內(nèi)源說明:文章來源地址http://www.zghlxwxcb.cn/news/detail-780341.html
- Docker 官方中國區(qū):https://registry.docker-cn.com
- 網(wǎng)易:http://hub-mirror.c.163.com
- 中國科技大學(xué):https://docker.mirrors.ustc.edu.cn
- 阿里云:https://pee6w651.mirror.aliyuncs.com
- docker官網(wǎng)中國區(qū)鏡像 --registry-mirror=https://registry.docker-cn.com
- 網(wǎng)易163 docker鏡像 --registry-mirror=http://hub-mirror.c.163.com
- USTC鏡像加速 --registry-mirror=https://docker.mirrors.ustc.edu.cn
- alicloud --registry-mirror=https://{your_id}.mirror.aliyuncs.com
到了這里,關(guān)于Docker設(shè)置國內(nèi)鏡像源的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!