Git Product home page Git Product logo

public-image-mirror's Introduction

public-image-mirror

Sync Deep Sync

Sync: 是 tag 的同步率 只要 tag 存在就是同步的

Deep sync: 是 tag 内容同步率 (如 latest 这种 tag 会更新, tag 存在并不一定是最新的, 在这属于未同步)

每天大约同步 1k 的 tag

背景

很多镜像都在国外。比如 gcr 。国内下载很慢,需要加速。

目标

  • 一个简洁有效的方法能够加速这些包。简洁的名称映射
  • 易于添加,添加新的包,不需要去修改代码。
  • 稳定可靠,更新实时。每天检查同步情况。

快速开始

docker run -d -P docker.m.daocloud.io/nginx

使用方法

支持的镜像仓库 的 前缀替换 就可以使用。比如:

k8s.gcr.io/coredns/coredns => k8s-gcr.m.daocloud.io/coredns/coredns

或者增加前缀。比如:

k8s.gcr.io/coredns/coredns => m.daocloud.io/k8s.gcr.io/coredns/coredns

支持的镜像源

domain.txt

如果想要新增, 提 PR 修改即可。例如 PR#28

支持的镜像

mirror.txt

如果想要新增, 提 PR 修改即可。例如 PR#1

替换规则

源站 替换为
cr.l5d.io l5d.m.daocloud.io
docker.elastic.co elastic.m.daocloud.io
docker.io docker.m.daocloud.io
gcr.io gcr.m.daocloud.io
ghcr.io ghcr.m.daocloud.io
k8s.gcr.io k8s-gcr.m.daocloud.io
registry.k8s.io k8s.m.daocloud.io
mcr.microsoft.com mcr.m.daocloud.io
nvcr.io nvcr.m.daocloud.io
quay.io quay.m.daocloud.io
registry.jujucharms.com jujucharms.m.daocloud.io
rocks.canonical.com rocks-canonical.m.daocloud.io

最佳实践

  • 通过 加速 安装 kubeadm
kubeadm config images pull --image-repository k8s-gcr.m.daocloud.io
  • 通过 加速 安装 kind
kind create cluster --name kind --image docker.m.daocloud.io/kindest/node:v1.22.1
  • 通过 加速 部署 应用(这里以 Ingress 为例)
wget -O image-filter.sh https://github.com/DaoCloud/public-image-mirror/raw/main/hack/image-filter.sh && chmod +x image-filter.sh

wget -O deploy.yaml https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/baremetal/deploy.yaml

cat ./deploy.yaml | ./image-filter.sh | kubectl apply -f -

[友情链接]加速三剑客

贡献者

Made with contrib.rocks.

public-image-mirror's People

Contributors

alexzhc avatar buffalo1024 avatar chaunceyjiang avatar cyclinder avatar erikjiang avatar fkajerry avatar floatxd avatar github-actions[bot] avatar haleygo avatar hanxiaop avatar jaredtan95 avatar kebe7jun avatar kerthcet avatar learner0810 avatar lou-lan avatar muma378 avatar pacoxu avatar panpan0000 avatar qilongqiu avatar san3xian avatar ssmallmonster avatar wawa0210 avatar weizhoublue avatar wilsonwu avatar wzshiming avatar xulongju avatar yangyy93 avatar yankay avatar ye-ting avatar yunmilktea avatar

Watchers

 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.