当前位置:   article > 正文

docker设置国内镜像源_docker 镜像站

docker 镜像站

一、国内加速地址

1、阿里云镜像站:(需登录,免费)

https://<your_code>.mirror.aliyuncs.com

2、网易云镜像站:

http://hub-mirror.c.163.com

3、百度云镜像站:

https://mirror.baidubce.com

4、上海交大镜像站:

https://docker.mirrors.sjtug.sjtu.edu.cn

5、南京大学镜像站:

https://docker.nju.edu.cn		



以下连接不公开或已失效:
1、Docker 中国官方镜像:(已关闭)
https://registry.docker-cn.com

2、中国科技大学 USTC:(仅供内部访问)
https://docker.mirrors.ustc.edu.cn


 

阿里云容器 生成自己的加速地址

登录:cr.console.aliyun.com

点击“创建我的容器镜像”,得到专属加速地址。

二、修改方法

创建或修改 /etc/docker/daemon.json 文件,修改为如下形式

  1. {
  2. "registry-mirrors": [
  3. "https://registry.hub.docker.com",
  4. "http://hub-mirror.c.163.com",
  5. "https://mirror.baidubce.com",
  6. "https://docker.mirrors.sjtug.sjtu.edu.cn",
  7. "https://docker.nju.edu.cn"
  8. ]
  9. }

加载重启docker

systemctl restart docker

查看是否成功

docker info

Docker Hub 镜像测速

  1. # 测速前先移除本地的镜像!
  2. $ docker rmi nginx:latest
  3. # 使用 time 统计所花费的总时间。
  4. $ time docker pull nginx:latest
  5. Pulling repository nginx
  6. [...]
  7. real 1m14.078s
  8. user 0m0.176s
  9. sys 0m0.120s

三、从指定repo拉取镜像

命令格式: library/<image:version>

  1. $ docker pull busybox
  2. # 指定Repo拉取镜像,等价于:
  3. $ docker pull hub-mirror.c.163.com/library/busybox:latest
  4. $ docker pull docker.io/library/busybox:latest
  5. $ docker pull registry.hub.docker.com/library/busybox:latest

-ref
docker 设置国内镜像源_docker国内镜像源-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/786450
推荐阅读
相关标签
  

闽ICP备14008679号