mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
build: 🔨⚡ optimize published artifact only in prod
This commit is contained in:
parent
6a7f669c0b
commit
bd2b09714b
2 changed files with 1 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ COPY directory/src/FilterLists.Directory.Infrastructure.Migrations/. FilterLists
|
|||
COPY directory/src/FilterLists.Directory.Application/. FilterLists.Directory.Application/
|
||||
WORKDIR /src/FilterLists.Directory.Api
|
||||
COPY directory/src/FilterLists.Directory.Api/. .
|
||||
RUN dotnet publish --no-restore -c Release -o /app/publish -r linux-musl-x64 -p:PublishSingleFile=true
|
||||
RUN dotnet publish -c Release --no-restore -o /app/publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-musl-x64
|
||||
|
||||
# package final
|
||||
FROM base AS final
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<PublishReadyToRunShowWarnings>true</PublishReadyToRunShowWarnings>
|
||||
<RuntimeIdentifiers>linux-musl-x64;win10-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue