docker拉取nginx镜像时报错:Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
1.检查网络是否正常
通过ping www.baidu.com查询
如图显示则网络正常,ctrl+c结束
2.配置镜像加速器
阿里云镜像加速地址:容器镜像服务 (aliyun.com)
如果仍然报错,可更换华为云加速器,我就是阿里云无法拉取镜像,更换华为云就好了
华为云加速器配置地址查询
登录华为云,按箭头指示操作即可,更换daemon.json文件中的地址