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

上一篇:Git放弃本地修改(只修改|已经add|已经commit)


下一篇:【每日英文】2021.7.24