Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker error in windows container read tcp : wsarecv: An existing connection was forcibly closed by the remote host

i am using the latest version of docker for windows. the linux container goes smoothly but i am getting below problem

wsarecv: An existing connection was forcibly closed by the remote host.

it occurs for fetching some specific image from repos. In my case i am fetching microsoft/aspnet. i have created a docker file and trying to built my custom image.I have followed the repository instruction for creating a docker file. the picture is given below

enter image description here

after this state i am getting this forcibly closed by remote host error.

my dockerfile content is

FROM microsoft/aspnet:4.7
ARG site_root=.
ADD ${site_root} /inetpub/wwwroot
like image 711
Kalyan Avatar asked Oct 05 '18 09:10

Kalyan


2 Answers

I am not sure exactly why this one worked, as I was trying to do a pull of a couple microsoft images. But in Settings > General > Expose daemon on tcp://localhost:2375 without TLS, worked for me. Following that I reverted the change but nice to have that on in the back-pocket. Might be related to firewall settings in Windows. I am using Win 10 Professional.

like image 60
nshouppuohsn Avatar answered Nov 14 '22 18:11

nshouppuohsn


I had been consistently encountering this error from inside a corporate network. We added mcr.microsoft.com to a firewall white-list, and everything worked as intended.

like image 2
Nathan Clement Avatar answered Nov 14 '22 16:11

Nathan Clement