Skip to content

Commit

Permalink
docker: publish with TrimMode set to partial
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jul 31, 2024
1 parent c730a77 commit 005dc42
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
11 changes: 6 additions & 5 deletions Notesnook.API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions Streetwriters.Identity/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions Streetwriters.Messenger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 005dc42

Please sign in to comment.