VS2017 /用于Windows的Docker /由于Symantec而导致发布版本失败

时间:2018-06-19 16:47:23

标签: c# docker visual-studio-2017 .net-core docker-for-windows

在工作中,我的任务是研究VS2017 / Docker对于Windows / Windows容器。我的.Net Core POC可以在调试和发布中很好地构建,但是似乎直接的Release版本可以在容器内部构建?

由于公司运行Symantec Endpoint Protection,并且容器在专用网络(172.xx.xx.xx)中运行,所以我的发行版无法在步骤7/16上使用

2>Step 7/16 : RUN dotnet restore xxx/xxx.csproj
2> ---> Running in 7bfc33fbb592
2>  Restoring packages for C:\src\xxx\xxx.csproj...
2>  Restoring packages for C:\src\xxx\xxx.csproj...
2>C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\src\DTMS2\DTMS2.csproj]
2>C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets(114,5): error :   A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [C:\src\xxx\xxx.csproj]
2>Service 'dtms2' failed to build: The command 'cmd /S /C dotnet restore xxx/xxx.csproj' returned a non-zero code: 1 

我一直在寻找SO,但没有一种解决方案对我有用:

1) can't get corp to give me an exclusion in SEP
2) would probably get yelled by the IT security goons at if I install a proxy on my PC
3) https -> http didn't work
4) creating a Hyper-V external switch didn't work either since I get an authentication error
5) Tried downloading the index json file and putting it on the host and specifying that in my nuget mgr options, but that's likely not picked up in this particular scenario?

还有其他选择吗?有没有一种方法可以像调试版本一样构建发布版本?在容器外面?

0 个答案:

没有答案