gitwtfhub

wtf is public-image-mirror?

daocloud/public-image-mirror — explained in plain English

Analysis updated 2026-06-24

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

TL;DR

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

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

Why would anyone build with this?

REASON 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.

REASON 2

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

REASON 3

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

REASON 4

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

What's in the stack?

Shell

How it stacks up

daocloud/public-image-mirrortrimstray/nginx-admins-handbooksindresorhus/pure
Stars14,07914,14714,236
LanguageShellShellShell
Setup difficultyeasymoderateeasy
Complexity2/53/51/5
Audienceops devopsops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

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.

Wtf does this do

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.

Yoink these 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?

Frequently asked questions

wtf is public-image-mirror?

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.

What language is public-image-mirror written in?

Mainly Shell. The stack also includes Shell.

What license does public-image-mirror use?

No license information is mentioned in the explanation.

How hard is public-image-mirror to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is public-image-mirror for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.