Second fix
This commit is contained in:
+5
-5
@@ -5,8 +5,8 @@ EXPOSE 443
|
|||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
||||||
ENV NUGET_XMLDOC_MODE=skip
|
NUGET_XMLDOC_MODE=skip
|
||||||
WORKDIR /app_source
|
WORKDIR /app_source
|
||||||
|
|
||||||
# 1. Copy everything over
|
# 1. Copy everything over
|
||||||
@@ -18,10 +18,10 @@ RUN rm -f global.json
|
|||||||
# 3. Restore all projects using the solution context
|
# 3. Restore all projects using the solution context
|
||||||
RUN dotnet restore "PostFundManagement.slnx"
|
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
|
FROM build AS publish
|
||||||
WORKDIR "/app_source/PostFundManagement.Api"
|
WORKDIR /app_source
|
||||||
RUN dotnet publish "PostFundManagement.Api.csproj" -c Release --no-restore -o /app/publish
|
RUN dotnet publish "PostFundManagement.Api/PostFundManagement.Api.csproj" -c Release --no-restore -o /app/publish
|
||||||
|
|
||||||
# 5. Final runtime assembly
|
# 5. Final runtime assembly
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
|
|||||||
Reference in New Issue
Block a user