added dockerfile
This commit is contained in:
@@ -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
|
||||
@@ -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"]
|
||||
Reference in New Issue
Block a user