Methods for Accelerating Docker Image Pulls in China
This article was last updated on: May 17, 2026 am
Overview
Pulling Docker images in China can be painful — slow speeds, frequent disconnections, and rate limiting without an account 😣. Here are several methods to speed things up.
To summarize, you may encounter the following situations:
- Slow download speeds / frequent disconnections in China: caused by network restrictions.
- Rate limiting without a public registry account: major registries like Docker Hub have started rate-limiting anonymous (unauthenticated) users in recent years, throttling pull speeds and capping the number of image pulls within a given time window.
To address these issues, here are several approaches:
For slow download speeds / frequent disconnections in China, the available methods are:
- Configure Docker Registry Mirrors that are accessible and reasonably fast within China
- Self-host a Docker Registry Mirror/Proxy and configure it as a mirror
- Configure proxies in the Docker Daemon
For rate limiting without a public registry account, the available method is:
- Register accounts on each registry and log in with docker login
Details for each approach follow.
Detailed Approaches
│ 📝Notes:
│
│ Docker is used as the example here.
│ For Containerd/Podman/cri-o, apply the same concepts accordingly.
- Configure Docker Registry Mirrors that are accessible and reasonably fast within China
- Alibaba Cloud Docker acceleration: a personal acceleration address like xxxxxx.mirror.aliyuncs.com
- DockerProxy acceleration: dockerproxy.com
- Baidu Cloud Mirror: mirror.baidubce.com
- …
- Self-host a Docker Registry Mirror/Proxy and configure it as a mirror
- Here we use a Cloudflare Worker — cloudflare-docker-proxy
- Configure Docker Daemon proxies, specifically: http-proxy https-proxy no-proxy
- Register accounts on each registry and log in with docker login
Implementation Details
Configure Available Docker Registry Mirrors in China
Available Docker Registry Mirrors in China change over time, so you need to adjust your configuration based on current availability.
As of 2023/9/5, the available mirrors are:
- Alibaba Cloud Docker acceleration: a personal acceleration address like xxxxxx.mirror.aliyuncs.com
- DockerProxy acceleration: dockerproxy.com
- Baidu Cloud Mirror: mirror.baidubce.com
- DaoCloud: docker.m.daocloud.io
- Nanjing University: docker.nju.edu.cn
- Shanghai Jiao Tong University: docker.mirrors.sjtug.sjtu.edu.cn
Testing Docker Registry Mirror Availability in China
You can verify availability yourself. The manual method is to pull an image — here’s an example testing dockerproxy.com:
1 | |
A successful pull from within China confirms the mirror is working.
You can also check the GitHub repository: docker-practice/docker-registry-cn-mirror-test for GitHub Action results. For example, a recent run showed:

Applying for Alibaba Cloud Docker Acceleration
Screenshot:

Other Acceleration Domains
- DockerProxy acceleration: dockerproxy.com
- Baidu Cloud Mirror: mirror.baidubce.com
- Daocloud: docker.m.daocloud.io
- Nanjing University: docker.nju.edu.cn
- Shanghai Jiao Tong University: docker.mirrors.sjtug.sjtu.edu.cn
These are all fixed domains — just add them to your configuration directly.
Docker Acceleration Domains That Are No Longer Available
The following Docker acceleration domains are no longer available or are restricted to the corresponding cloud provider’s internal network:
- 163: hub-mirror.c.163.com
- USTC: docker.mirrors.ustc.edu.cn
- Tencent Cloud: mirror.ccs.tencentyun.com
- Azure China: dockerhub.azk8s.cn
- Qiniu Cloud: reg-mirror.qiniu.com
- Docker CN: registry.docker-cn.com
Docker Registry Mirror Configuration
Create or modify /etc/docker/daemon.json:
1 | |
Self-Hosting a Docker Registry Mirror/Proxy
Prerequisites
- A Cloudflare account
- (Optional) A custom domain hosted on Cloudflare
- Sufficient Cloudflare Workers quota
cloudflare-docker-proxy
Here we use a Cloudflare Worker — cloudflare-docker-proxy. The original README has some issues; you can refer to this README.md for implementation.
Here’s an example using a custom domain configuration:
- Fork the repo
- Update the Deploy button URL to point to your own repo URL
- Modify the const routes block in src/index.js
1 | |
- Click the “Deploy” button to deploy. After deployment it looks like this:

- Add a CNAME record in Cloudflare DNS pointing to the deployed ${workername}.${username}.workers.dev address. Example:

- In Workers HTTP Routes, add xxx.your-domain.com/* routes pointing to cloudflare-docker-proxy, where xxx is docker, quay, gcr, etc. Example:

Done.
Docker Registry Mirror Configuration
Add your configured docker.
Configuring Docker Daemon proxies
If you prefer not to set up mirrors, you can configure proxies instead to pull Docker Hub images through a proxy.
Prerequisites
- A proxy that can reliably reach Docker Hub
Docker Daemon Configuration
vi /etc/docker/daemon.json, add the following:
1 | |
│ 📝Notes:
│
│ The no-proxy field in Docker Daemon supports CIDR notation.
Done.
Register Accounts on Each Registry and Log In
Including but not limited to:
After registration, depending on the registry, you may log in directly with a password, or you may need to create a Token/Service Account with a dedicated credential.
Registration steps are omitted here.
Log In with docker login
Docker Hub login:
1 | |
Other Docker Registry logins:
1 | |
Alternatively, you can write directly to the ~/.docker/config.json file:
1 | |
1 | |
Done.
Summary
With the methods above, you should be well-equipped to work with Docker smoothly in China.