App (Ghostnet.Dashboard, baut fehlerfrei mit 0 Warnungen, .NET 10): - OIDC konfigurationsgetrieben (Auth:Enabled/Authority/ClientId in appsettings.json, Secret nur via ENV Auth__ClientSecret), Authorization Code Flow mit PKCE, Cookie-Schema - KeycloakRealmRolesClaimTransformation mappt realm_access.roles auf Role-Claims; Policy DashboardAccess erfordert Realm-Rolle dashboard-admin (im Off-Modus permissive) - Endpoint-Autorisierung an MapRazorComponents().RequireAuthorization() (.NET 10: AuthorizeRouteView hat keinen Policy-Parameter mehr), UseForwardedHeaders fuer TLS-Terminierung an NPM, /login + /logout - Paket Microsoft.AspNetCore.Authentication.OpenIdConnect 10.0.14 Rolle/Quadlet: host-lokale, verwaltete Secrets-Datei /etc/gnmon/dashboard-secrets.env (Owner gn-dashboard, 0640, force: false) per EnvironmentFile im Quadlet; Image-Default auf v0.2.0 angehoben, Inventory pinnt v0.2.0; Duplikat gnmon_dashboard_quadlet_dir entfernt; Containerfile-Kommentar an die keep-id-Entscheidung (GNMON-000 M5) angepasst. Doku: GNMON-000 (M6-Abschnitt, Verifikation 09.11.2026 nach Host-Neustart, CT-103-Ansible-Nachbau als erledigt markiert) und GNMON-001 v2.1 (Umsetzungsabweichungen: gn-monitor=986, Braille statt ApexCharts, Hostname mon.ghostnet.selfhost.eu, offene Punkte 1-4 entschieden). Externe Freigabe (NPM-Proxyhost + Keycloak-Client gn-dashboard + Auth__Enabled=true) bleibt Betreiber-Schritt, siehe GNMON-000 M6. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
29 lines
1.1 KiB
Docker
29 lines
1.1 KiB
Docker
# GNMON-001 section 6: Blazor Server dashboard image.
|
|
# Multi-stage build from the MCR .NET images (not Docker Hub, so server
|
|
# side rebuilds stay possible even under Docker Hub rate limits).
|
|
# Runs as a non-root user; the rootless quadlet uses the default user-namespace
|
|
# mapping (keep-id was tested 06.11.2026 and rejected on the server — crun
|
|
# Permission denied on the overlay merged dir; GNMON-000 M5), so the image
|
|
# user maps into the gn-dashboard subuid range on the host.
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
WORKDIR /src
|
|
|
|
# Restore first so the layer cache survives source edits.
|
|
COPY Ghostnet.Dashboard.csproj .
|
|
RUN dotnet restore Ghostnet.Dashboard.csproj
|
|
|
|
COPY . .
|
|
RUN dotnet publish Ghostnet.Dashboard.csproj -c Release -o /app --no-restore
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
|
WORKDIR /app
|
|
COPY --from=build /app .
|
|
|
|
# Non-root runtime user; keeps UID equal to the host workload account
|
|
# (gn-dashboard, 984) so host-side processes are attributable.
|
|
ENV ASPNETCORE_URLS=http://127.0.0.1:8080 \
|
|
DOTNET_GENERATE_ASPNET_KEY=true
|
|
USER 984:984
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["dotnet", "Ghostnet.Dashboard.dll"]
|