- 
      
 - 
        
Save 851235550/d008ca716b60f57c560aadbbd735dc82 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
y0ngb1n revised this gist
May 26, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,3 +73,4 @@ sys 0m0.120s + https://github.com/moby/moby/blob/d409b05970e686993e343d226fae5b463d872082/docs/articles/registry_mirror.md + https://www.fengbohello.top/archives/docker-registry-mirror + https://www.ilanni.com/?p=14534 + https://github.com/Azure/container-service-for-azure-china/blob/master/aks/README.md#22-container-registry-proxy  - 
        
y0ngb1n revised this gist
May 24, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ "https://dockerproxy.com", "https://1nj0zren.mirror.aliyuncs.com", "https://docker.mirrors.ustc.edu.cn", "http://f1361db2.m.daocloud.io", @@ -27,7 +28,7 @@ sudo systemctl restart docker ## Docker Hub 镜像加速器列表 镜像加速器 | 镜像加速器地址 | 专属加速器[?](# "需登录后获取平台分配的专属加速器") | 其它加速[?](# "支持哪些镜像来源的镜像加速") --- | --- | --- | --- ~~[Docker 中国官方镜像](https://docker-cn.com/registry-mirror)~~ | ~~`https://registry.docker-cn.com`~~ | | ~~Docker Hub~~([已关闭](https://github.com/docker/docker.github.io/issues/8793)) [DaoCloud 镜像站](https://daocloud.io/mirror) | `http://f1361db2.m.daocloud.io` | 可登录,系统分配 | Docker Hub [Azure 中国镜像](https://github.com/Azure/container-service-for-azure-china/blob/master/aks/README.md#22-container-registry-proxy) | `https://dockerhub.azk8s.cn` | | Docker Hub、GCR、Quay @@ -36,6 +37,7 @@ sudo systemctl restart docker [七牛云](https://kirk-enterprise.github.io/hub-docs/#/user-guide/mirror) | `https://reg-mirror.qiniu.com` | | Docker Hub、GCR、Quay [网易云](https://c.163yun.com/hub) | `https://hub-mirror.c.163.com` | | Docker Hub [腾讯云](https://cloud.tencent.com/document/product/457/9113) | `https://mirror.ccs.tencentyun.com` | | Docker Hub [Docker 镜像代理]() | `https://dockerproxy.com/` | | Docker Hub、GCR、K8S、GHCR ## 检查加速器是否生效  - 
        
y0ngb1n revised this gist
Mar 10, 2020 . No changes.There are no files selected for viewing
 - 
        
y0ngb1n revised this gist
Dec 16, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ sudo tee /etc/docker/daemon.json <<-'EOF' "https://1nj0zren.mirror.aliyuncs.com", "https://docker.mirrors.ustc.edu.cn", "http://f1361db2.m.daocloud.io", "https://dockerhub.azk8s.cn" ] } EOF @@ -28,7 +28,7 @@ sudo systemctl restart docker 镜像加速器 | 镜像加速器地址 | 专属加速器[?](# "需登录后获取平台分配的专属加速器") | 其它加速[?](# "支持哪些镜像来源的镜像加速") --- | --- | --- | -- ~~[Docker 中国官方镜像](https://docker-cn.com/registry-mirror)~~ | ~~`https://registry.docker-cn.com`~~ | | ~~Docker Hub~~([已关闭](https://github.com/docker/docker.github.io/issues/8793)) [DaoCloud 镜像站](https://daocloud.io/mirror) | `http://f1361db2.m.daocloud.io` | 可登录,系统分配 | Docker Hub [Azure 中国镜像](https://github.com/Azure/container-service-for-azure-china/blob/master/aks/README.md#22-container-registry-proxy) | `https://dockerhub.azk8s.cn` | | Docker Hub、GCR、Quay [科大镜像站](https://mirrors.ustc.edu.cn/help/dockerhub.html) | `https://docker.mirrors.ustc.edu.cn` | | Docker Hub、[GCR](https://github.com/ustclug/mirrorrequest/issues/91)、[Quay](https://github.com/ustclug/mirrorrequest/issues/135) @@ -44,7 +44,7 @@ sudo systemctl restart docker ```console Registry Mirrors: [...] https://dockerhub.azk8s.cn/ ``` ## Docker Hub 镜像测速  - 
        
y0ngb1n revised this gist
May 8, 2019 . No changes.There are no files selected for viewing
 - 
        
y0ngb1n created this gist
May 8, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,73 @@ # Docker Hub 镜像加速器 国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。 ## 配置加速地址 > Ubuntu 16.04+、Debian 8+、CentOS 7+ 创建或修改 `/etc/docker/daemon.json`: ```bash sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ "https://1nj0zren.mirror.aliyuncs.com", "https://docker.mirrors.ustc.edu.cn", "http://f1361db2.m.daocloud.io", "https://registry.docker-cn.com" ] } EOF sudo systemctl daemon-reload sudo systemctl restart docker ``` ## Docker Hub 镜像加速器列表 镜像加速器 | 镜像加速器地址 | 专属加速器[?](# "需登录后获取平台分配的专属加速器") | 其它加速[?](# "支持哪些镜像来源的镜像加速") --- | --- | --- | -- [Docker 中国官方镜像](https://docker-cn.com/registry-mirror) | `https://registry.docker-cn.com` | | Docker Hub [DaoCloud 镜像站](https://daocloud.io/mirror) | `http://f1361db2.m.daocloud.io` | 可登录,系统分配 | Docker Hub [Azure 中国镜像](https://github.com/Azure/container-service-for-azure-china/blob/master/aks/README.md#22-container-registry-proxy) | `https://dockerhub.azk8s.cn` | | Docker Hub、GCR、Quay [科大镜像站](https://mirrors.ustc.edu.cn/help/dockerhub.html) | `https://docker.mirrors.ustc.edu.cn` | | Docker Hub、[GCR](https://github.com/ustclug/mirrorrequest/issues/91)、[Quay](https://github.com/ustclug/mirrorrequest/issues/135) [阿里云](https://cr.console.aliyun.com) | `https://<your_code>.mirror.aliyuncs.com` | 需登录,系统分配 | Docker Hub [七牛云](https://kirk-enterprise.github.io/hub-docs/#/user-guide/mirror) | `https://reg-mirror.qiniu.com` | | Docker Hub、GCR、Quay [网易云](https://c.163yun.com/hub) | `https://hub-mirror.c.163.com` | | Docker Hub [腾讯云](https://cloud.tencent.com/document/product/457/9113) | `https://mirror.ccs.tencentyun.com` | | Docker Hub ## 检查加速器是否生效 命令行执行 `docker info`,如果从结果中看到了如下内容,说明配置成功。 ```console Registry Mirrors: [...] https://registry.docker-cn.com/ ``` ## Docker Hub 镜像测速 使用镜像前后,可使用 `time` 统计所花费的总时间。测速前先移除本地的镜像! ```console $ docker rmi node:latest $ time docker pull node:latest Pulling repository node [...] real 1m14.078s user 0m0.176s sys 0m0.120s ``` --- ## 参考链接 + https://docs.docker.com/registry/recipes/mirror/ + https://github.com/yeasy/docker_practice/blob/master/install/mirror.md + https://github.com/moby/moby/blob/d409b05970e686993e343d226fae5b463d872082/docs/articles/registry_mirror.md + https://www.fengbohello.top/archives/docker-registry-mirror + https://www.ilanni.com/?p=14534