• Stars
    star
    4,932
  • Rank 8,413 (Top 0.2 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated 15 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

很多镜像都在国外。比如 gcr 。国内下载很慢,需要加速。致力于提供连接全世界的稳定可靠安全的容器镜像服务。

public-image-mirror

Sync Deep Sync

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

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

每天大约同步 1k 的 tag

支持懒加载, 就算不在同步列表中也能直接拉取, 初次拉取会比已经同步过的慢一些, 并且每 7 天会清理一次缓存

如果只是临时使用的就不需要往同步列表里加了

背景

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

目标

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

快速开始

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

支持的镜像

mirror.txt

如果想要新增, 提 PR 修改即可。例如 PR#1, 并请在 PR 提交前排序: ./hack/fmt.sh mirror.txt

使用方法

添加一级域名

增加前缀 (推荐方式)。比如:

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

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

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

提前同步的 Registry

domain.txt

用于 github action 从源 registry 提前同步到 m.daocloud.io 下

如果想要新增, 提 PR 修改即可。例如 PR#28, 并请在 PR 提交前排序:./hack/fmt.sh domain.txt

支持前缀替换的 Registry

前缀替换的 Registry 的规则

如有新增, 提 PR 修改下面的表格, 合并后由人工配置

源站 替换为
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 -
  • Docker 加速

添加到 /etc/docker/daemon.json

  "registry-mirrors": [
    "https://docker.m.daocloud.io"
  ]

[友情链接]加速三剑客

贡献者

Made with contrib.rocks.

More Repositories

1

crproxy

CRProxy (Container Registry Proxy) is a generic image proxy
Go
299
star
2

dao-2048

2048 is a number puzzle game.
JavaScript
206
star
3

DaoCloud-docs

DaoCloud Enterprise 5.0 Documentation
Python
175
star
4

daochain

Docker image verification system based on Ethereum
JavaScript
120
star
5

dao-style

🎉 A high quality component library built on Vue.js 2.0
Vue
119
star
6

public-binary-files-mirror

很多 binary 文件 都在国外。国内下载很慢,需要加速。
Go
74
star
7

python-ipython-notebook

Shell
69
star
8

dao

Docker Toolkit 运维套件
Go
65
star
9

php-laravel-mysql-sample

PHP
47
star
10

docker-mirror

docker hub mirror, Docker镜像加速器
46
star
11

php-apache-image

Shell
37
star
12

php-apache-mysql-sample

PHP
32
star
13

python-django-sample

Python
31
star
14

public-helm-charts-mirror

This repository contains Helm charts served by DaoCloud
Python
26
star
15

python-mysql-sample

Sample application in python and mysql
Python
26
star
16

python-sample-base-image

22
star
17

secure-python-sample

Python
20
star
18

golang-mongo-sample

Sample application in golang
Go
19
star
19

ckube

Kubernetes APIServer 高性能代理组件,代理 APIServer 的 List 请求,其它类型的请求会直接反向代理到原生 APIServer。 CKube 还额外支持了分页、搜索和索引等功能。 并且,CKube 100% 兼容原生 kubectl 和 kube client sdk,只需要简单的配置即可实现全局替换。
Go
18
star
20

node-mongo-sample

node-mongo-sample
JavaScript
14
star
21

library-image

Maintain the images synced from dockerhub
14
star
22

karmada-operator1

Go
12
star
23

php-sample

PHP
12
star
24

ghost

ghost blog
JavaScript
11
star
25

example-voting-app

Example Docker Compose app
JavaScript
11
star
26

python-django-cd-sample

Continous Delivery Sample
Python
10
star
27

daocloud-doc

10
star
28

dce-charts-repackage

helm repo add daocloud https://daocloud.github.io/dce-charts-repackage/
Mustache
10
star
29

python-redis-sample

Sample application in python and redis
Python
10
star
30

php-newrelic-sample

PHP
9
star
31

docker-demo-spring-boot

Shell
9
star
32

ropee

A scalable prometheus remote storage adapter for splunk.
Go
8
star
33

daocloud-api-docs

DaoCloud OpenAPI docs
Python
8
star
34

docker-demo-java-tomcat

Java
8
star
35

docker-demo-java-mongo

Java
6
star
36

help.daocloud.io

http://help.daocloud.io
Shell
6
star
37

golang-redis-sample

Go
5
star
38

dao-tomcat

Shell
5
star
39

dao-mysql

Shell
5
star
40

dao-wordpress

PHP
4
star
41

golang-mysql-sample

Go
4
star
42

ruby-mysql-sample

Ruby
3
star
43

dce-windows-demos

JavaScript
3
star
44

storage-charts-repackage

Mustache
3
star
45

golang-influxdb-sample

Go
3
star
46

dao-redis

Shell
2
star
47

influxdb_sample

draw a sine line into influxdb
Python
2
star
48

dao-runtime

Repo for a runtime implementation in a tenant environment
Python
2
star
49

dao-phpmyadmin

PHP
2
star
50

hiring

2
star
51

dao-proxy

Automated Discovery Nginx Proxy, makes Docker Compose work like Heroku with 3 lines of code.
Go
2
star
52

kubernetes-images

2
star
53

spring-boot-sample

Java
2
star
54

dce-Jenkins-plugin

JavaScript
1
star
55

ci-images

Shell
1
star
56

df-front-end-demo

df-front-end-demo
HTML
1
star
57

dce-plugin-sdk-py

DCE plugin SDK for Python.
Python
1
star
58

spring-boot-demo

Shell
1
star
59

alpine

Alpine Linux 3.3 with glibc
1
star
60

phpmyadmin

PHP
1
star
61

golang-rabbitmq-sample

Go
1
star
62

benchmark-tools

benchmark for DCE
1
star
63

daovoice-wp-plugin

DaoVoice plugin for wordpress .
PHP
1
star
64

tomcat

给 tomcat 镜像增加默认 JAVA_OPTS 限制内存使用量
Python
1
star