
使用 docker compose up -d 时提示 context deadline exceeded 或 request canceled while wait... 等等异常,
原因是网络不通,我们可以使用官方推荐的代理 https://dockerproxy.net
注意,这里是 .net 不是 .com,之前的 .com 域名已经废弃。
编辑并保存 /etc/docker/daemon.json 文件,或使用以下代码生成:
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://dockerproxy.net"
]
}
EOF
然后重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
同时提供一些其他镜像地址:
{
"registry-mirrors": [
"https://docker.1panel.live",
"https://dockerproxy.net",
"https://docker.1ms.run",
"https://dytt.online",
"https://docker-0.unsee.tech",
"https://lispy.org",
"https://docker.xiaogenban1993.com",
"https://666860.xyz",
"https://hub.rat.dev",
"https://docker.m.daocloud.io",
"https://demo.52013120.xyz",
"https://proxy.vvvv.ee",
"https://registry.cyou",
"https://mirror.ccs.tencentyun.com"
]
}