explaingit

daocloud/public-image-mirror

14,079ShellAudience · ops devopsComplexity · 2/5Setup · easy

TLDR

A public mirror service that lets users in China download Docker and Kubernetes container images from blocked registries like gcr.io, ghcr.io, and registry.k8s.io by swapping the domain prefix.

Mindmap

mindmap
  root((image-mirror))
    What it does
      Mirrors blocked registries
      China-accessible URLs
    Supported registries
      docker.io
      gcr.io and ghcr.io
      registry.k8s.io
      AI model registries
    How to use
      Swap domain prefix
      Add m dot prefix
    Platforms
      Docker
      Kubernetes
      Containerd
    Extras
      Webhook auto-rewrite
      90-day cache
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Pull a Kubernetes system image from k8s.m.daocloud.io instead of the blocked registry.k8s.io when setting up a cluster inside China.

USE CASE 2

Configure Docker daemon to use mirror addresses so all image pulls are automatically routed through without changing individual commands.

USE CASE 3

Deploy the Webhook tool on a Kubernetes cluster to automatically rewrite image references in pod specs without touching YAML files or Helm charts.

USE CASE 4

Pull Ollama AI models such as DeepSeek-R1 through the dedicated DaoCloud mirror endpoint.

Tech stack

Shell

Getting it running

Difficulty · easy Time to first run · 5min

No local installation needed, swap the registry domain in your pull command or daemon config.

No license information is mentioned in the explanation.

In plain English

This repository provides a public mirror service for container images that are slow or inaccessible from within China. Container images are packages used to run software in isolated environments called containers, and many popular image registries such as Google gcr.io, GitHub ghcr.io, Microsoft mcr.microsoft.com, and registry.k8s.io are hosted outside China, making downloads slow or unreliable for users and servers inside the country. The mirror works by adding a prefix to any image URL. Instead of pulling from docker.io/library/nginx, you pull from m.daocloud.io/docker.io/library/nginx. An alternative is to swap the registry domain for a DaoCloud equivalent: docker.io becomes docker.m.daocloud.io, gcr.io becomes gcr.m.daocloud.io, registry.k8s.io becomes k8s.m.daocloud.io, and so on for all supported registries. The README includes a table listing each supported source registry and its mirror address. Configuration examples are provided for Docker, Kubernetes (via kubeadm and kind), and Containerd. For Kubernetes clusters, there is also a Webhook-based tool that automatically rewrites image references in all new pods without requiring any changes to existing YAML files or Helm charts. Ollama images and AI models such as DeepSeek-R1 can also be pulled through a dedicated mirror endpoint. Cached content is stored for 90 days and content hashes match the originals, so the files you receive are identical to what you would get from the source registries. The README notes that pulling is best done during off-peak hours (01:00 to 07:00 Beijing time) due to high demand during the day. The README is primarily written in Chinese, and the backend source code is maintained in a separate linked repository.

Copy-paste prompts

Prompt 1
I'm setting up a Kubernetes cluster in China using kubeadm and images from registry.k8s.io are failing. Show me how to configure kubeadm to use k8s.m.daocloud.io as the image repository instead.
Prompt 2
Configure my Docker daemon on a China-based server to use m.daocloud.io as a mirror for docker.io so all image pulls are automatically routed through it.
Prompt 3
I'm running a kind cluster locally in China and image pulls from gcr.io and docker.io keep timing out. Show me how to configure kind to use DaoCloud mirror addresses.
Prompt 4
Deploy the DaoCloud image rewrite Webhook on my Kubernetes cluster so new pods automatically get their image URLs rewritten to use mirror addresses without me changing any YAML.
Prompt 5
I need to pull the deepseek-r1 model via Ollama on a server in China. What is the correct mirror URL to use from the DaoCloud public-image-mirror service?
Open on GitHub → Explain another repo

← daocloud on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.