Created
July 20, 2020 06:36
-
-
Save mwaaas/ff596c6450b6fe9d48e0bfb235ea57e8 to your computer and use it in GitHub Desktop.
Windows container not accessing internet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting this error while building dot net application. | |
Unable to load the service index for source https://api.nuget.org/v3/index.json | |
It fails when it trys to restore packages and it can't access nutget repository | |
To confirm this run the following command to access PowerShell inside a container | |
docker run -it --rm microsoft/nanoserver:sac2016 powershell | |
Then while inside the container run this command to try and reach nutget repository | |
Invoke-WebRequest -UseBasicParsing -OutFile index.json https://api.nuget.org/v3/index.json | |
If it fails that's the error am talking about, not able to access internet inside the container network. Hence causing the build to fail at the restoring package step. | |
solution can be found here | |
https://github.com/docker/for-win/issues/2760#issuecomment-430889666 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment