Red Hat Bugzilla – Bug 1465779
aspnetcore.all meta package restore slows down s2i build and consumes bandwidth
Last modified: 2017-07-06 09:57:20 EDT
ASP.NET Core 2.0 introduces a meta package to reference the major packages that make up the web framework.
The Microsoft dotnet docker sdk image caches these packages from nuget.org in the image.
This has the advantage of both speeding up the build and not wasting the bandwidth of downloading for each build.
With my internet connection/machine this takes about 1-2min and downloads 130MB of packages.
$ rm -rf ~/.nuget ~/.local/share/NuGet/; time dotnet new mvc
$ du -ch $(find ~/.nuget/packages -name '*.nupkg') | tail -1
Since we are not caching these packages, this restore currently happens for every s2i build.
Andrew, how about we do this nuget cache warmup in the 2.0 s2i builder image? This should solve the issue, right?
Severin, I had implemented that but this is being removed as part of https://github.com/redhat-developer/s2i-dotnetcore/pull/88/files#diff-6f2669af799dae0df04fa82a92c1d7f9L60. The motivation is we are not building these packages.