Added stream redirection to dotnet commands

This commit is contained in:
2026-09-14 09:13:46 +02:00
parent 43c777dfe2
commit f9c0c5fe16
2 changed files with 21 additions and 20 deletions
+3 -3
View File
@@ -21,13 +21,13 @@ RUN dotnet restore "PostFundManagement.Api/PostFundManagement.Api.csproj"
# Copy full source tree
COPY . .
# Build the API project
RUN dotnet build "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
# Force build output to stderr (1>&2) so the deployment platform captures compilation errors
RUN dotnet build "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build 1>&2
# 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
RUN dotnet publish "PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false 1>&2
# Final runtime stage
FROM base AS final