Added better dotnet build handling

This commit is contained in:
2026-09-14 09:41:47 +02:00
parent 1771d74b43
commit 2047e440d8
+4 -3
View File
@@ -21,13 +21,14 @@ RUN dotnet restore "PostFundManagement.Api/PostFundManagement.Api.csproj"
# Copy full source tree
COPY . .
# Force build output to stderr (1>&2) so the deployment platform captures compilation errors
RUN dotnet build --verbosity diagnostic "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build 1>&2
# 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
# Publish stage
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false 1>&2
RUN dotnet publish "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
# Final runtime stage
FROM base AS final