From cb596358821e38c92f2aa21a509d584c90d985db Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Mon, 14 Sep 2026 10:20:42 +0200 Subject: [PATCH] Simplified fpm-api dockerfile --- PostFundManagement.Api/Dockerfile | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/PostFundManagement.Api/Dockerfile b/PostFundManagement.Api/Dockerfile index 37ee5cf..dec38cb 100644 --- a/PostFundManagement.Api/Dockerfile +++ b/PostFundManagement.Api/Dockerfile @@ -1,32 +1,20 @@ -# Base image for running the app FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base + WORKDIR /app EXPOSE 8080 EXPOSE 8081 -# Build stage -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release -WORKDIR /src -# Copy full source tree COPY . . -RUN ls -lth - -# 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 /b1 "./PostFundManagement.Api/PostFundManagement.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build +WORKDIR ./PostFundManagement.Api +RUN ls -lth -# 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.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false -# Final runtime stage -FROM base AS final -WORKDIR /app COPY --from=publish /app/publish . + ENTRYPOINT ["dotnet", "PostFundManagement.Api.dll"] \ No newline at end of file