From afaad43c479446b9828bdec1a49d9b1b75383aab Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Mon, 14 Sep 2026 10:03:45 +0200 Subject: [PATCH] Simplified dockerfile (pfm-api) --- PostFundManagement.Api/Dockerfile | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/PostFundManagement.Api/Dockerfile b/PostFundManagement.Api/Dockerfile index 0d3d330..e581edb 100644 --- a/PostFundManagement.Api/Dockerfile +++ b/PostFundManagement.Api/Dockerfile @@ -9,21 +9,12 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src -# Copy the solution file first -COPY "PostFundManagement.sln" ./ - -# Copy project files for dependency restoration -COPY ["PostFundManagement.Api/PostFundManagement.Api.csproj", "PostFundManagement.Api/"] -COPY ["PostFundManagement.Application/PostFundManagement.Application.csproj", "PostFundManagement.Application/"] -COPY ["PostFundManagement.Domain/PostFundManagement.Domain.csproj", "PostFundManagement.Domain/"] -COPY ["PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj", "PostFundManagement.Infrastructure/"] - -# Restore dependencies -RUN dotnet restore "PostFundManagement.Api/PostFundManagement.Api.csproj" - # Copy full source tree COPY . . +# Restore the entire solution +RUN dotnet restore PostFundManagement.slnx + # Force build output to standard output using the classic logger and explicit error dumping #RUN dotnet build --tl:off /clp:NoSummary --verbosity detailed "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build RUN dotnet build --tl:off "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build > /tmp/build.log 2>&1 || (echo "=== BUILD FAILED! DUMPING LOGS ===" && cat /tmp/build.log && exit 1)