背景:
# 拉基础镜像
docker pull ubuntu:20.04
报错如下:
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决方法:
sudo vi /etc/docker/daemon.json
添加下面的内容到文件中。
{
"registry-mirrors": ["https://docker-proxy.741001.xyz","https://registry.docker-cn.com"]
}<