title: Gitlab CI and .NET Core - Can't get nuget cache with 2 stage build
body: <p>I have dockerfile like that:</p>
  
  <pre><code>FROM microsoft/aspnetcore-build:2.0 AS build-env WORKDIR /app
  
      # Copy csproj and restore as distinct layers 
  COPY *.csproj ./ 
  COPY *.config ./ 
  RUN dotnet restore --configfile NuGet.config
      # Copy everything else and build 
  COPY . ./ RUN dotnet publish -c Release -o out
  
  # Build runtime image 
  FROM microsoft/aspnetcore:2.0 
  WORKDIR /app 
  COPY --from=build-env /app/out . 
  ENV ASPNETCORE_URLS http://+:5000 
  ENTRYPOINT ["dotnet", "AuthService.dll"]
  </code></pre>
  
  <p>I cannot get for that on Gitlab build.</p>
  
  <p>The whole Nuget cache sits in <code>build-env</code> under <code>~/.nuget/packages</code> but Gitlab somehow does not see that (I suppose it checks only last container.</p>
  
  <p>Any idea how to solve it? It is making builds so long because of no NuGet cache... </p>