Wira Ciputra

← writing

docker

Speed up docker pull in China

Point Docker at a registry mirror in daemon.json to stop pulls from failing or stalling


Update, July 2026. Most of this no longer works. The large public registry mirrors in China (USTC, 163, Qiniu) were shut down in mid-2024, and dockerproxy.com went with them. The daemon.json mechanism itself is still the right place to configure a mirror, the URLs below are just dead.

Original post from March 2022 kept below, unedited.

If you are in China and your docker pull kept failing/retrying, try editing your docker daemon.json.

The default location for linux is at /etc/docker/daemon.json.

{
  "registry-mirrors": [
    "https://dockerproxy.com"
  ]
}

Then restart docker service with:

sudo systemctl daemon-reload
sudo systemctl restart docker

To check if it is correct, run docker info | grep -A1 'Registry Mirrors:'

If you can understand Chinese it is better to just go to the website directly and learn, dockerproxy.com

Another registry mirror that you can use (at this time of writing):