added dockerfile

This commit is contained in:
2026-10-24 12:02:41 +01:00
parent c7e2c69733
commit c2d8d34902
2 changed files with 15 additions and 4 deletions
-4
View File
@@ -4,13 +4,9 @@ obj/
riderModule.iml
/_ReSharper.Caches/
/.vs
<<<<<<< Updated upstream
/OmegaLeo.HelperLib.Web
=======
/OmegaLeo.HelperLib.Web/.config
/OmegaLeo.HelperLib.Web/Properties/PublishProfiles
/OmegaLeo.HelperLib.Web/publish
>>>>>>> Stashed changes
/OmegaLeo.HelperLib.Web/OmegaLeo.HelperLib.Web.csproj.user
*.sh
+15
View File
@@ -0,0 +1,15 @@
# 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"]