-
Notifications
You must be signed in to change notification settings - Fork 52
/
Dockerfile
28 lines (23 loc) · 916 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /App
COPY . ./
# Runtime can be e.g. linux-x64 or linux-arm64, see officially supported Runtime Identifiers
ARG RUNTIME
RUN dotnet publish Arrowgene.Ddon.Cli/Arrowgene.Ddon.Cli.csproj /p:Version=1.0.0.0 -p:PublishReadyToRun=true /p:DebugType=None /p:DebugSymbols=false -r ${RUNTIME:-linux-x64} --self-contained false -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0
#RUN apt-get update && apt-get install -y apt-transport-https && rm -rf /var/lib/apt/lists/*
# Database
EXPOSE 3306/tcp
# Game server
EXPOSE 52000/tcp
# Web server
EXPOSE 52099/tcp
# Login server
EXPOSE 52100/tcp
ENV DOTNET_EnableDiagnostics=0
WORKDIR /var/ddon/server
COPY --from=build-env /App/out .
RUN adduser --disabled-password --gecos "" ddon_server
RUN chown -R ddon_server:ddon_server .
USER ddon_server
CMD ["/var/ddon/server/Arrowgene.Ddon.Cli", "server", "start"]