aspcore-pgo.dockerfile 726 B

12345678910111213141516171819202122
  1. FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  2. WORKDIR /app
  3. COPY PlatformBenchmarks .
  4. RUN dotnet publish -c Release -o out
  5. FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
  6. ENV ASPNETCORE_URLS http://+:8080
  7. ENV DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS 1
  8. WORKDIR /app
  9. COPY --from=build /app/out ./
  10. COPY Benchmarks/appsettings.json ./appsettings.json
  11. # Switch off AoT code in libs to allow for greater instrumentation
  12. ENV COMPlus_ReadyToRun 0
  13. # Move methods with loops to Tier0 rather than Tier1 by default for greater instrumentation
  14. ENV COMPlus_TC_QuickJitForLoops 1
  15. # Switch on Profile Guided Optimization instrumentation at Tier0
  16. ENV COMPlus_TieredPGO 1
  17. EXPOSE 8080
  18. ENTRYPOINT ["dotnet", "PlatformBenchmarks.dll"]