GithubHelp home page GithubHelp logo

xaw330 / docker-registry-mirrors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubesre/docker-registry-mirrors

0.0 0.0 0.0 32 KB

多平台容器镜像代理服务,支持 Docker Hub, GitHub, Google, k8s, Quay, Microsoft 等镜像仓库.

License: MIT License

docker-registry-mirrors's Introduction

docker-registry-mirrors

Auth GitHub contributors GitHub Issues GitHub Pull Requests GitHub Pull Requests HitCount GitHub license

多平台容器镜像代理服务,支持 Docker Hub, GitHub, Google, k8s, Quay, Microsoft 等镜像仓库.


本项目灵感来自:Thanks-Mirror,该项目分享的是docker镜像直接可用,质量好,速度快的镜像

在此,对那些提供公共仓库镜像的企业或组织,致以感谢🫡!

📢 注意:今日一些提供公有镜像仓库的组织,宣布因监管要求被下架,需要自行核实镜像加速地址的有效性,如果失效了,或者发现了新的镜像也欢迎告诉我们。目前已知提供公有镜像服务比较好的项目:public-image-mirror

仓库地址 镜像地址 备注
ghcr.io ghcr.nju.edu.cn 南京大学开源镜像站, nexus3
ghcr.m.daocloud.io daocloud
ghcr.tencentcloudcr.com 仅腾讯云vpc内部访问,registry2 proxy
registry.k8s.io registry-k8s-io.mirrors.sjtug.sjtu.edu.cn 上海交通大学, registry2 proxy
k8s.m.daocloud.io daocloud
k8s.nju.edu.cn 南京大学开源镜像站, nexus3
k8s.gcr.io gcr.nju.edu.cn 南京大学开源镜像站, nexus3
k8s-gcr-io.mirrors.sjtug.sjtu.edu.cn 上海交通大学
k8s-gcr.m.daocloud.io daocloud
k8s.tencentcloudcr.com 仅腾讯, 云vpc内部访问, registry2 proxy
quay.io quay.nju.edu.cn 南京大学开源镜像站, nexus3
quay.m.daocloud.io daocloud
quay.tencentcloudcr.com 仅腾讯云vpc内部访问, registry2 proxy
quay.mirrors.ustc.edu.cn 中科大
nvcr.io nvcr.nju.edu.cn 南京大学开源镜像站, nexus3
nvcr.m.daocloud.io daocloud
nvcr.tencentcloudcr.com 仅腾讯云vpc内部访问, registry2 proxy
docker.io mirror.ccs.tencentyun.com 仅腾讯云vpc内部访问, registry2 proxy
docker.nju.edu.cn 南京大学开源镜像站, nexus3
docker.mirrors.sjtug.sjtu.edu.cn 上海交通大学, registry2 proxy
reg-mirror.qiniu.com 七牛云
docker.mirrors.ustc.edu.cn 中科大
docker.m.daocloud.io 国内可用, 带宽低
hub-mirror.c.163.com 网易国内可用,更新慢

使用方法

前言

以argocd 清单文件为例:

wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

首先需要确定原始镜像地址仓库

以argocd yaml文件举例:

grep -n image: install.yaml
21645:        image: quay.io/argoproj/argocd:v2.11.0
21739:        image: ghcr.io/dexidp/dex:v2.38.0
21768:        image: quay.io/argoproj/argocd:v2.11.0
21850:        image: quay.io/argoproj/argocd:v2.11.0
21927:        image: redis:7.0.14-alpine
22162:        image: quay.io/argoproj/argocd:v2.11.0
22214:        image: quay.io/argoproj/argocd:v2.11.0
22531:        image: quay.io/argoproj/argocd:v2.11.0
22825:        image: quay.io/argoproj/argocd:v2.11.0

在表格中找到仓库地址对应的镜像地址

quay.io在表格中的镜像地址可选择quay.nju.edu.cn ghcr.io 在表格中的镜像地址可选择 ghcr.nju.edu.cn

方案一

使用方式:

使用方式都是替换原来镜像的前缀域名即可实现加速效果,比如:

#docker.io
原来地址: redis:7.0.14-alpine  # 这个是官方镜像,省略了前边的域名
替换地址: docker.nju.edu.cn/redis:7.0.14-alpine
#quary.io
原来的地址: quay.io/argoproj/argocd:v2.11.0
替换地址: quay.nju.edu.cn/argoproj/argocd:v2.11.0
#ghcr.io
原来的地址: ghcr.io/dexidp/dex:v2.38.0
替换地址: ghcr.nju.edu.cn/dexidp/dex:v2.38.0

方案二

注意事项

通过这种方式只能加速docker hub的镜像,对于其他镜像仓库,比如k8s.gcr.io, quay.io等,需要使用方案一替换前缀的方式进行加速。

使用方式:

还有一种方案是通过将加速地址写入到docker配置文件当中实现加速。

Ubuntu14.04、Debian7Wheezy

对于使用 upstart 的系统而言,编辑 /etc/default/docker 文件,在其中的 DOCKER_OPTS 中配置加速器地址:

DOCKER_OPTS="--registry-mirror=https://hub-mirror.c.163.com"

Ubuntu16.04+、Debian8+、CentOS7

对于使用 systemd 的系统,请在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件):

{
  "registry-mirrors": [
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com"
  ]
}

贡献者

Made with contrib.rocks.

docker-registry-mirrors's People

Contributors

gebangfeng avatar cf1998 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.