forked from LunaMultiplayer/LunaMultiplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_Server
27 lines (22 loc) · 1.05 KB
/
Dockerfile_Server
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
#Build this image with: docker build --file Dockerfile_Server -t lmpsrv:latest .
#Delete the image with the command: docker image rm lmpsrv:latest
#Create a container with: docker run -td -p 8800:8800 -p 8900:8900 --name lmpsrv lmpsrv:latest
# the -t (tty) flag is needed so docker can send SIGINT for proper shutdown.
#Attach to a container with: docker exec -it lmpsrv /bin/ash
#When inside a container, you can dettach with: CONTROL+P+Q
#Check logs with: docker logs -f lmpsrv
#Stop a container with: docker stop lmpsrv
#Start a container with: docker start lmpsrv
#Remove a container with: docker container rm lmpsrv
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine as builder
COPY . /LunaMultiplayer
RUN cd LunaMultiplayer/Server && \
dotnet publish -r linux-musl-x64 -o Publish
FROM alpine:edge
RUN apk add icu-libs libstdc++ libgcc
COPY --from=builder /LunaMultiplayer/Server/Publish/ /LMPServer/
EXPOSE 8800/udp 8900/tcp
VOLUME "/LMPServer/Config" "/LMPServer/Plugins" "/LMPServer/Universe" "/LMPServer/logs"
STOPSIGNAL sigint
WORKDIR /LMPServer
CMD ./Server