From bf48ba5d18150fa2fcb5acd99bdcf61d2bf1ade5 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 14 Jul 2026 11:25:59 +0200 Subject: [PATCH] Refactored dockerfile base and final images --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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