Added debug code to dotnet build and publish lines

This commit is contained in:
2026-09-13 18:09:38 +02:00
parent 2a8d72963d
commit 4bac2f58c2
+12 -8
View File
@@ -9,22 +9,26 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
WORKDIR /src WORKDIR /src
# Copy project file from the current directory context # Copy project files for dependency restoration
COPY ["PostFundManagement.Api.csproj", "./"] 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 # Restore dependencies with normal verbosity to stderr/stdout
RUN dotnet restore "PostFundManagement.Api.csproj" RUN dotnet restore "PostFundManagement.Api/PostFundManagement.Api.csproj" -v n 2>&1
# Copy the remaining source code in PostFundManagement.Api # Copy full source tree
COPY . . COPY . .
# Build the API project # Build the API project with stderr output
RUN dotnet build "PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build WORKDIR "/src/PostFundManagement.Api"
RUN dotnet build "PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build -v n 2>&1
# Publish stage # Publish stage
FROM build AS publish FROM build AS publish
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false RUN dotnet publish "PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false -v n 2>&1
# Final runtime stage # Final runtime stage
FROM base AS final FROM base AS final