其他分享
首页 > 其他分享> > docker .net5 Determining projects to restore... 失败

docker .net5 Determining projects to restore... 失败

作者:互联网

报错如下

/usr/share/dotnet/sdk/5.0.302/NuGet.targets(131,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/src/ApiServer/ApiServer.csproj]
/usr/share/dotnet/sdk/5.0.302/NuGet.targets(131,5): error :   The HTTP request to 'GET https://api.nuget.org/v3/index.json' has timed out after 100000ms. [/src/ApiServer/ApiServer.csproj]
The command '/bin/sh -c dotnet restore "ApiServer/ApiServer.csproj"' returned a non-zero code: 1

//添加--network=host
docker build -t net5test -f Dockerfile . --network=host

标签:...,index,Determining,share,ApiServer,restore,csproj,dotnet
来源: https://www.cnblogs.com/ives/p/15125676.html