diff --git a/Dockerfile b/Dockerfile index b0dc007..0c0f01f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1: Build environment -FROM mcr.microsoft.com/dotnet/sdk:10.0-bookworm-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build # 1. Explicitly run as root for the build stage USER root WORKDIR /src @@ -17,7 +17,7 @@ RUN dotnet build "LiteCharmsMessaging.csproj" -c Release -o /app/build RUN dotnet publish "LiteCharmsMessaging.csproj" -c Release -o /app/publish /p:UseAppHost=false # Stage 2: Runtime environment -FROM mcr.microsoft.com/dotnet/aspnet:10.0-bookworm-slim AS final +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final WORKDIR /app # 2. Switch to the built-in non-root user ('app') before copying files