Dotnet Restore fails in docker build Dotnet Restore fails in docker build docker docker

Dotnet Restore fails in docker build


Try this

docker network ls

This should list the networkIDs try running the docker build

docker build --network=<networkid> tag=<tag>

try the above with all the network listed it will work with one, that's the host network.


Try updating your DNS Server to be Fixed (default should be 8.8.8.8).

I found this in Settings-> Network -> DNS Server


If on Windows 7 or Windows Server 2008 R2, enable TLS 1.2 to talk to the new NuGet server.Microsoft DevBlogs on NuGet TLS status