配置docker鏡像加速器

登陸阿里云鏡像倉(cāng)庫(kù) https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

如果沒有阿里云賬號(hào),需要注冊(cè)一個(gè),并開通個(gè)人版的容器鏡像服務(wù)即可

找到自己的鏡像加速器地址,然后按照如下方法操作 [root@xianchaomaster1 ~]#vim /etc/docker/daemon.json,變成如下

{ "registry-mirrors":[ "https://fgx99taj.mirror.aliyuncs.com", "https://docker.lmirror.top","https://docker.m.daocloud.io", "https://hub.uuuadc.top", "https://docker.anyhub.us.kg", "https://dockerhub.jobcher.com", "https://dockerhub.icu", "https://docker.ckyl.me", "https://docker.awsl9527.cn", "https://docker.laoex.link"], "insecure-registries":["192.168.40.62","harbor" ] }

注意:https://fgx99taj.mirror.aliyuncs.com 是自己阿里云賬號(hào)個(gè)人的加速網(wǎng)址,全球唯一

讓配置文件生效 [root@xianchaomaster1 ~]#systemctl daemon-reload [root@xianchaomaster1 ~]#systemctl restart docker

[root@xianchaomaster1 ~]# docker pull nginx

如果無(wú)法拉起,可能是加速域名失效

查看已經(jīng)成功拉下來(lái)的nginx鏡像文件如下:
docker images


03.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容