diff --git a/Dockerfile b/Dockerfile index b2e6d6a..2ffcf2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,8 @@ EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH -ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 -ENV NUGET_XMLDOC_MODE=skip +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \ + NUGET_XMLDOC_MODE=skip WORKDIR /app_source # 1. Copy everything over @@ -18,10 +18,10 @@ RUN rm -f global.json # 3. Restore all projects using the solution context RUN dotnet restore "PostFundManagement.slnx" -# 4. Move directly to the publish stage +# 4. Publish directly from the root using the solution context FROM build AS publish -WORKDIR "/app_source/PostFundManagement.Api" -RUN dotnet publish "PostFundManagement.Api.csproj" -c Release --no-restore -o /app/publish +WORKDIR /app_source +RUN dotnet publish "PostFundManagement.Api/PostFundManagement.Api.csproj" -c Release --no-restore -o /app/publish # 5. Final runtime assembly FROM base AS final