【发布时间】:2018-10-02 11:33:58
【问题描述】:
在代理后面使用 docker-compose 构建时,我遇到了块恢复错误。我在 docker for windows 中设置了代理。 Nuget 恢复适用于命令行 dotnet restore 和 Visual Studio 调试,但不适用于 docker-compose。
:\Program Files\dotnet\sdk\2.1.104\NuGet.targets(104,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\src\WebApp.sln]
:\Program Files\dotnet\sdk\2.1.104\NuGet.targets(104,5): error : An error occurred while sending the request. [C:\src\WebApp.sln]
:\Program Files\dotnet\sdk\2.1.104\NuGet.targets(104,5): error : A connection with the server could not be established [C:\src\WebApp.sln]
ERROR: Service 'idenityapi' failed to build: The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet restore -nowarn:msb3202,nu1503' r
turned a non-zero code: 1
【问题讨论】:
标签: docker nuget docker-compose dockerfile nuget-package-restore