Skip to content

Instantly share code, notes, and snippets.

@fub2
Last active October 4, 2017 09:18
Show Gist options
  • Save fub2/7caa2c630e9c4887492554b3503db46d to your computer and use it in GitHub Desktop.
Save fub2/7caa2c630e9c4887492554b3503db46d to your computer and use it in GitHub Desktop.
Docker hub mirror in China
# Example:
```
$ sudo echo "DOCKER_OPTS=\"--registry-mirror=http://hub-mirror.c.163.com\"" >> /etc/default/docker
$ service docker restart
```
Or another way with updating /usr/lib/systemd/system/docker.service with:
```
ExecStart=/usr/bin/docker-current daemon --registry-mirror=http://{your_id}.m.daocloud.io\
```
Or a way with script Daocloud provided:
```
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://{your_id}.m.daocloud.io
systemctl enable docker; systemctl daemon-reload ; systemctl restart docker
```
List of mirrors:
https://registry.docker-cn.com
http://hub-mirror.c.163.com
https://docker.mirrors.ustc.edu.cn
http://{your_id}.m.daocloud.io
https://{your_id}.mirror.aliyuncs.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment