16 lines
615 B
Docker
16 lines
615 B
Docker
# Build context is the repository root (the Web project references sibling library projects).
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
|
WORKDIR /src
|
|
COPY . .
|
|
RUN dotnet publish "OmegaLeo.HelperLib.Web/OmegaLeo.HelperLib.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
|
|
WORKDIR /app
|
|
COPY --from=build /app/publish .
|
|
# Serilog writes to /app/logs; make it writable for the non-root "app" user.
|
|
RUN mkdir -p /app/logs && chown -R app:app /app/logs
|
|
USER app
|
|
ENV ASPNETCORE_HTTP_PORTS=8080
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["dotnet", "OmegaLeo.HelperLib.Web.dll"]
|