参考:Docker可用国内加速镜像地址分享 https://www.codingone.top/archives/188
ubuntu系统,修改/etc/docker/daemon.json
,修改如下。
{builder: {gc: {defaultKeepStorage: 20GB,enabled: true}},experimental: false,features: {buildkit: true},registry-mirrors: ["https://docker.mirrors.ustc.edu.cn","https://mirror.baidubce.com","https://docker.m.daocloud.io","https://mirror.ccs.tencentyun.com","https://docker.nju.edu.cn","https://docker.mirrors.sjtug.sjtu.edu.cn","https://mirror.gcr.io", "https://docker.registry.cyou","https://docker-cf.registry.cyou","https://dockercf.jsdelivr.fyi","https://docker.jsdelivr.fyi","https://dockertest.jsdelivr.fyi","https://mirror.aliyuncs.com","https://dockerproxy.com ]}
###【修改后需要重启】:
sudo systemctl daemon-reloadsudo systemctl restart dockersudo systemctl status dockersudo docker info
【其他】 也可以直接查看 GitHub 仓库:docker-practice/docker-registry-cn-mirror-test 的 Github Action 执行结果。