Configuring download mirror in Docker

Increase docker image download speed in mainland China

Posted by Xiping Hu on January 27, 2020

Using Azure mirror and Netease mirror.

Add these in /etc/docker/daemon. (touch this file if it does not exist)

1
2
3
4
5
6
{
  "registry-mirrors": [
    "https://dockerhub.azk8s.cn",
    "https://hub-mirror.c.163.com"
  ]
}

Then run

1
2
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker