From e4dd94628066a40f36facabd14b02fa8730b7083 Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Sat, 6 Jun 2026 00:33:13 +0200 Subject: [PATCH] Added ebug code to docker fiiles --- src/LiteCharmsSecurity.Admin.Api/Dockerfile | 6 +++++- src/LiteCharmsSecurity.Admin/Dockerfile | 7 +++++-- src/LiteCharmsSecurity.STS.Identity/Dockerfile | 9 +++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/LiteCharmsSecurity.Admin.Api/Dockerfile b/src/LiteCharmsSecurity.Admin.Api/Dockerfile index 17e47a4..bfeb5fa 100644 --- a/src/LiteCharmsSecurity.Admin.Api/Dockerfile +++ b/src/LiteCharmsSecurity.Admin.Api/Dockerfile @@ -9,7 +9,11 @@ WORKDIR /app_source COPY . . -RUN --network=host dotnet restore "LiteCharmsSecurity.sln" +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" --verbosity normal > /tmp/restore_error.log 2>&1 || true + +RUN cat /tmp/restore_error.log + +RUN if grep -q "error" /tmp/restore_error.log; then exit 1; fi WORKDIR "/app_source/src/LiteCharmsSecurity.Admin.Api" RUN dotnet build "LiteCharmsSecurity.Admin.Api.csproj" -c Release -o /app/build diff --git a/src/LiteCharmsSecurity.Admin/Dockerfile b/src/LiteCharmsSecurity.Admin/Dockerfile index 2e8232d..ae9b45e 100644 --- a/src/LiteCharmsSecurity.Admin/Dockerfile +++ b/src/LiteCharmsSecurity.Admin/Dockerfile @@ -11,7 +11,6 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \ NUGET_XMLDOC_MODE=skip WORKDIR /app_source -# Pull in the node runtimes for UI asset bundling COPY --from=node /usr/local/bin/node /usr/local/bin/node COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ @@ -19,7 +18,11 @@ RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ COPY . . -RUN --network=host dotnet restore "LiteCharmsSecurity.sln" +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" --verbosity normal > /tmp/restore_error.log 2>&1 || true + +RUN cat /tmp/restore_error.log + +RUN if grep -q "error" /tmp/restore_error.log; then exit 1; fi WORKDIR "/app_source/src/LiteCharmsSecurity.Admin" RUN dotnet build "LiteCharmsSecurity.Admin.csproj" -c Release -o /app/build diff --git a/src/LiteCharmsSecurity.STS.Identity/Dockerfile b/src/LiteCharmsSecurity.STS.Identity/Dockerfile index 5b707f4..79334ba 100644 --- a/src/LiteCharmsSecurity.STS.Identity/Dockerfile +++ b/src/LiteCharmsSecurity.STS.Identity/Dockerfile @@ -7,13 +7,14 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH WORKDIR /app_source -# Copy everything from repository root into /app_source COPY . . -# Restore the solution from the root context -RUN --network=host dotnet restore "LiteCharmsSecurity.sln" +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" --verbosity normal > /tmp/restore_error.log 2>&1 || true + +RUN cat /tmp/restore_error.log + +RUN if grep -q "error" /tmp/restore_error.log; then exit 1; fi -# Paths match your repository exactly now: src/ is just under the root WORKDIR "/app_source/src/LiteCharmsSecurity.STS.Identity" RUN dotnet build "LiteCharmsSecurity.STS.Identity.csproj" -c Release -o /app/build