docker: publish with TrimMode set to partial

This commit is contained in:
Abdullah Atta
2024-07-31 12:17:22 +05:00
parent c730a77b41
commit 005dc4284d
3 changed files with 18 additions and 15 deletions

View File

@@ -27,11 +27,12 @@ RUN dotnet build -c Release -o /app/build -a $TARGETARCH
FROM build AS publish
RUN dotnet publish -c Release -o /app/publish \
#--runtime alpine-x64 \
--self-contained true \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
-a $TARGETARCH
#--runtime alpine-x64 \
--self-contained true \
/p:TrimMode=partial \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
-a $TARGETARCH
FROM --platform=$BUILDPLATFORM base AS final
ARG TARGETARCH