0
0

Move to chiseled dotnet docker image

This commit is contained in:
Serghei Cebotari 2024-01-14 15:25:12 +03:00
parent 722a394d03
commit 3b3c1c1e29

View File

@ -1,12 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build
WORKDIR /app WORKDIR /source
COPY . .
RUN dotnet publish -o /app
COPY . ./ FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:8.0
EXPOSE 5000 EXPOSE 5000
WORKDIR /app WORKDIR /app
COPY --from=build /app/out . COPY --from=build /app .
ENV ASPNETCORE_ENVIRONMENT Production ENV ASPNETCORE_ENVIRONMENT Production
ENTRYPOINT [ "dotnet", "RhSolutions.Api.dll", "--urls=http://0.0.0.0:5000" ] ENTRYPOINT ["./RhSolutions.Api", "--urls=http://0.0.0.0:5000"]