|
@@ -1,19 +1,18 @@
|
|
|
-FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
|
|
|
-WORKDIR /source
|
|
|
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
|
+WORKDIR /app
|
|
|
+COPY Benchmarks .
|
|
|
+RUN dotnet publish -c Release -o out
|
|
|
|
|
|
-# copy csproj and restore as distinct layers
|
|
|
-COPY Benchmarks/*.csproj .
|
|
|
-RUN dotnet restore -r linux-musl-x64
|
|
|
+FROM mcr.microsoft.com/dotnet/runtime:6.0 AS runtime
|
|
|
|
|
|
-# copy and publish app and libraries
|
|
|
-COPY Benchmarks/ .
|
|
|
-RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore --self-contained
|
|
|
+# Full PGO
|
|
|
+ENV DOTNET_TieredPGO 1
|
|
|
+ENV DOTNET_TC_QuickJitForLoops 1
|
|
|
+ENV DOTNET_ReadyToRun 0
|
|
|
|
|
|
-# final stage/image
|
|
|
-FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-alpine
|
|
|
WORKDIR /app
|
|
|
-COPY --from=build /app .
|
|
|
+COPY --from=build /app/out ./
|
|
|
|
|
|
-ENTRYPOINT ["./Benchmarks"]
|
|
|
+EXPOSE 8080
|
|
|
|
|
|
-EXPOSE 8080
|
|
|
+ENTRYPOINT ["dotnet", "Benchmarks.dll"]
|