Last active
March 25, 2025 03:42
-
-
Save fub2/7caa2c630e9c4887492554b3503db46d to your computer and use it in GitHub Desktop.
Docker hub mirror in China
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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