Speed up docker pull in China

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.

1
2
3
4
5
{
  "registry-mirrors": [
    "https://dockerproxy.com"
  ]
}

Then restart docker service with:

1
2
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):

Licensed under CC BY-NC-SA 4.0