genhttp.dockerfile 541 B

12345678910111213141516171819
  1. FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
  2. WORKDIR /source
  3. # copy csproj and restore as distinct layers
  4. COPY Benchmarks/*.csproj .
  5. RUN dotnet restore -r linux-musl-x64
  6. # copy and publish app and libraries
  7. COPY Benchmarks/ .
  8. RUN dotnet publish -c release -o /app -r linux-musl-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true
  9. # final stage/image
  10. FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine
  11. WORKDIR /app
  12. COPY --from=build /app .
  13. ENTRYPOINT ["./Benchmarks"]
  14. EXPOSE 8080