From 7926368fb9ee58e8482761c77f2320bdc691a7f7 Mon Sep 17 00:00:00 2001 From: Gerard Smit Date: Mon, 21 Sep 2020 23:43:02 +0200 Subject: [PATCH] Added PublishTrimmed to Impostor.Server (#3) * Added PublishTrimmed to Impostor.Server * Disabled trimming in CI * Fixed Dockerfile for trimming --- .github/workflows/main.yml | 2 +- Dockerfile | 4 ++-- src/Impostor.Server/Impostor.Server.csproj | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e668c4..36b89dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: - name: Build Impostor.Client run: msbuild ./src/Impostor.Client/Impostor.Client.csproj /p:Configuration=Release - name: Build Impostor.Server - run: dotnet build --no-restore -c Release -f netcoreapp3.1 ./src/Impostor.Server/Impostor.Server.csproj + run: dotnet build --no-restore -c Release -f netcoreapp3.1 ./src/Impostor.Server/Impostor.Server.csproj -p:PublishTrimmed=false - name: Test run: dotnet test --no-restore -v normal -f netcoreapp3.1 ./src deploy: diff --git a/Dockerfile b/Dockerfile index bca3c3e..472694a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,10 @@ RUN dotnet restore -r linux-musl-x64 ./src/Impostor.Server/Impostor.Server.cspro # Copy everything else. COPY submodules/. ./submodules/ COPY src/. ./src/ -RUN dotnet publish -c release -o /app -f netcoreapp3.1 -r linux-musl-x64 --self-contained false --no-restore ./src/Impostor.Server/Impostor.Server.csproj +RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore ./src/Impostor.Server/Impostor.Server.csproj # Final image. -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine WORKDIR /app COPY --from=build /app ./ EXPOSE 22023/udp diff --git a/src/Impostor.Server/Impostor.Server.csproj b/src/Impostor.Server/Impostor.Server.csproj index 559e2f6..bed5d07 100644 --- a/src/Impostor.Server/Impostor.Server.csproj +++ b/src/Impostor.Server/Impostor.Server.csproj @@ -4,6 +4,7 @@ Exe netcoreapp3.1 win-x64;linux-x64;linux-musl-x64 + true Impostor.Server Impostor.Server Copyright © AeonLucid 2020 -- 2.39.5