使用自定义docker加速地址下载镜像

14324472932024-11-17linux运维257

1.例如加速地址为:

https://docker.m.daocloud.io

2.配置docker加速地址

cat > /etc/docker/daemon.json <<EOF
> {"registry-mirrors": ["https://docker.m.daocloud.io"]}
> EOF

3.重启docker让加速地址生效

systemctl  daemon-reload 
systemctl  start  docker.service

4.使用加速地址下载docker

docker pull docker.m.daocloud.io/hello-world   #拉取镜像
docker tag docker.m.daocloud.io/hello-world hello-world   #拉取镜像自定义文件名

5.可以使用该开源项目搭建docker加速项目:https://github.com/jonssonyan/cf-workers-proxy

相关文章

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。