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

后端 未结 13 1568
温柔的废话
温柔的废话 2021-02-12 01:45

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

Docker command docker build -t aspnetapp.

I am getting an error for docker bui

13条回答
  •  爱一瞬间的悲伤
    2021-02-12 02:15

    Had the same issue, the problem was a missing dependency used by NuGet.

    I am using the microsoft/dotnet:sdk image, and it works after installing libcurl3 to my image.

    Try adding RUN apt-get update && apt-get install -y libcurl3 to your Dockerfile before restoring.

    if it doesn't work, try restarting your Docker instance.

    edit: if that doesn't help you, there is this open issue on the NuGet github where some people are trying to solve the same problem.

    edit2:added Ignas solution: restarting docker instance.

提交回复
热议问题