From a5ff5c6e0791a0ab242e10328bca5d57cf47f297 Mon Sep 17 00:00:00 2001 From: Derek S <44935661+Derek-R-S@users.noreply.github.com> Date: Thu, 6 Jan 2022 13:56:40 -0600 Subject: [PATCH] Update Dockerfile --- Dockerfile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84145a1..91ab2a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS builder -WORKDIR /ServerProject-DONT-IMPORT-INTO-UNITY -COPY . . -ARG BUILD_MODE="Release" -RUN dotnet publish \ - --output /build/ \ - --configuration $BUILD_MODE \ - --no-self-contained . - -FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env WORKDIR /lrm -COPY --from=builder /build/ . +COPY . . +RUN dotnet publish --runtime ubuntu.20.04-x64 -c Release -o out + +FROM mcr.microsoft.com/dotnet/aspnet:5.0 +WORKDIR /lrm +COPY --from=build-env /app/out . ENV NO_CONFIG="true" ENV TRANSPORT_CLASS="kcp2k.KcpTransport" @@ -40,5 +36,4 @@ EXPOSE 7777/udp EXPOSE 7776/udp EXPOSE 8080 -CMD [ "./LRM" ] ENTRYPOINT [ "./LRM" ]