Docker build给出错误:等待头时超过了Client.Timeout [英] Docker build giving error: Client.Timeout exceeded while awaiting headers

查看:538
本文介绍了Docker build给出错误:等待头时超过了Client.Timeout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用具有Docker支持的Visual Studio 2017创建Web项目(Linux)我无法启动在Visual Studio中创建的示例MVC项目。就在昨天,一切正常。我检查了防火墙,并多次重新安装了Docker。有任何想法吗?



构建命令(由Visual Studio生成):


docker build -f
C:\Users\User\source\repos\testDocker2\testDocker2\Dockerfile -t
testdocker2:dev --target base --label
com.microsoft.created-by = visual-studio
C:\Users\User\source\repos\testDocker2


错误:`


获取
`

解决方案

我遇到了相同的错误通过控制台。



检查网络连接设置后,我看到IP是静态设置的,但DNS设置为空。



所以我设置了


守护程序的错误响应:获取


Creating a web project using Visual Studio 2017 with Docker support (linux) I am not able to start the example MVC project created within Visual Studio. Just yesterday everything worked fine. I checked the firewall, reinstalled Docker many times. Any ideas?

Build command (generated by visual studio):

docker build -f "C:\Users\User\source\repos\testDocker2\testDocker2\Dockerfile" -t testdocker2:dev --target base --label "com.microsoft.created-by=visual-studio" "C:\Users\User\source\repos\testDocker2"

Error: `

Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

See the image below:

`

解决方案

I had the same error from the console.

After checking the "Network Connections" settings, I saw that IP was set statically, but DNS setting was empty.

So I set a DNS value also retry after that, and it worked.

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)

这篇关于Docker build给出错误:等待头时超过了Client.Timeout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆