Skip to content

Many images are abroad. For example, gcr. Domestic downloads are slow and need to be accelerated. It is committed to providing a stable, reliable and secure container image service connecting the world.

License

Notifications You must be signed in to change notification settings

DaoCloud/public-image-mirror

Folders and files

Name Name
Last commit message
Last commit date

Latest commit

 

History

998 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

public-image-mirror

 Sync

Sync: Synchronize the synchronization rate of image tags in the list regularly. As long as the tags exist, they are synchronized

Due to the recent sharp increase in usage, in order to ensure the availability of most

  • Whitelist&flow restriction&degraded public information #2328
  • If you have any questions, please consult #4183

Background&Objectives

Many images are abroad. For example, gcr. Domestic downloads are slow and need to be accelerated.

  • A simple and effective method can speed up these packages. Concise name mapping
  • Easy to add, add new packages, no need to modify the code.
  • Stable and reliable, updated in real time. Check the synchronization every day.
  • This item is only a mirror of the source image warehouse (Registry)
    • All hashes (sha256) are consistent with the source (lazy loading mechanism).
    • Due to the existence of cache, there may be a delay of 1 hour.
    • If it has not been updated for more than one hour, it is estimated that the international bandwidth is suspended.
  • The blob will be cached on third-party object storage
    • Currently, no detection has been performed on the content. It is planned to add detection.

Quick Start

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

usage method

Add prefix (Recommended method). For example:

 docker.io/library/busybox | V m.daocloud.io/docker.io/library/busybox

Or the supported image warehouse Prefix replacement Can be used. For example:

 docker.io/library/busybox | V docker.m.daocloud.io/library/busybox

Single mirror synchronization

!!!!!!!!!!!!!!!!!!!!!!!! Strongly recommended!!!!!!!!!!!!!!!!!!!!!!!!

You can Mirror Synchronization Issue Template Create an Issue, and a robot will help you proactively synchronize the specified image

The original image under will continue to be the same. You need to restart the docker and then pull again to access the synchronized cache. Therefore, it is recommended that you synchronize once before trying to pull The latest tag, which often changes content, needs to be resynchronized after change

Lazy loading

Only recommended for images smaller than 20MiB This channel is mainly used to keep the image up to date. Each pull will check whether it is synchronized with the upstream

If you see that there is no progress, it is due to limited bandwidth. As long as there are several people under the command, large files will block subsequent downloads. You can try Single mirror synchronization

Even without synchronization Direct pull , the first pull will be slower than the synchronized one

All lazy loads bandwidth

  • International bandwidth 6 * 30 Mbps

Periodic synchronization list (not recommended)

It is strongly recommended to use Single mirror synchronization

mirror.txt

If you want to add a new one, just ask PR to modify it. for example PR#1 , and please sort before PR submission: ./hack/fmt.sh mirror.txt

Registry supporting prefix replacement (not recommended)

It is recommended to add prefix

Prefix replacement registry rules, which are manually configured, need to provide Issue

Origin Replace with remarks
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 K8s.gcr.io has been migrated to registry.k8s.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

Best Practices

  • Install kubeadm by accelerating
 kubeadm config images pull --image-repository k8s-gcr.m.daocloud.io
  • By accelerating the installation of kind
 kind create cluster --name kind --image m.daocloud.io/docker.io/kindest/node:v1.22.1
  • By accelerating the deployment of applications (Ingress is taken as an example here)
 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 acceleration

Add to /etc/docker/daemon.json

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

[Friendly link] Accelerate the Three Swordsmen

contributor

Made with contrib.rocks .

About

Many images are abroad. For example, gcr. Domestic downloads are slow and need to be accelerated. It is committed to providing a stable, reliable and secure container image service connecting the world.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages