Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\app\aspnetapp.csproj]

后端 未结 2 1519
予麋鹿
予麋鹿 2021-02-11 16:56

https://github.com/dotnet/dotnet-docker-samples/tree/master/aspnetapp

Docker command docker build -t aspnetapp.

I am getting an error for docker bui

2条回答
  •  难免孤独
    2021-02-11 17:53

    This appears to happen when there are multiple network adaptors present for the host and the priority of said adaptor is misconfigured. Run the following to display a table of your network adaptors:

    Get-NetIPInterface -AddressFamily IPv4 | Sort-Object -Property InterfaceMetric -Descending
    

    You want your primary adaptor (in my case wifi) to have the lowest InterfaceMetric.

    Set-NetIPInterface -InterfaceAlias 'Wi-Fi' -InterfaceMetric 1
    

    My network adaptor table for reference:

    See this github thread for more information: https://github.com/docker/for-win/issues/2760#issuecomment-430889666

提交回复
热议问题