From eeea3e7e1106259f8bf38d401493054fc94bd8a3 Mon Sep 17 00:00:00 2001 From: tleininger Date: Mon, 21 Sep 2026 21:18:31 +0200 Subject: [PATCH] Enable de-DE culture with ICU runtime image --- Dockerfile | 15 ++++++++------- Elternbeirat.Web/Elternbeirat.Web.csproj | 4 ++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ed2661..a63399d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,22 @@ # syntax=docker/dockerfile:1 -# --- Build-Stufe: SDK-Image kompiliert und published die App --- +# --- Build stage: the SDK image compiles and publishes the app --- FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /src -# Zuerst nur die csproj kopieren und restoren, damit der NuGet-Restore-Layer -# gecacht bleibt, solange sich die Abhaengigkeiten nicht aendern. +# Copy only the csproj and restore first, so the NuGet restore layer stays +# cached as long as the dependencies do not change. COPY Elternbeirat.Web/Elternbeirat.Web.csproj Elternbeirat.Web/ RUN dotnet restore Elternbeirat.Web/Elternbeirat.Web.csproj -# Dann der restliche Quellcode. +# Then the rest of the source. COPY . . RUN dotnet publish Elternbeirat.Web/Elternbeirat.Web.csproj -c Release -o /app -# --- Runtime-Stufe: schlankes chiseled-Image, laeuft als non-root (UID 1654), -# hoert auf Port 8080, enthaelt keine Shell (kein HEALTHCHECK mit curl/sh). --- -FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled AS runtime +# --- Runtime stage: slim chiseled image, runs as non-root (UID 1654), listens +# on port 8080, has no shell (no HEALTHCHECK with curl/sh). The "extra" variant +# carries ICU and tzdata, which the pages need to format German (de-DE) dates. --- +FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-extra AS runtime WORKDIR /app COPY --from=build /app . EXPOSE 8080 diff --git a/Elternbeirat.Web/Elternbeirat.Web.csproj b/Elternbeirat.Web/Elternbeirat.Web.csproj index e6069f2..00146f3 100644 --- a/Elternbeirat.Web/Elternbeirat.Web.csproj +++ b/Elternbeirat.Web/Elternbeirat.Web.csproj @@ -5,6 +5,10 @@ enable enable true + + false