forked from LunaMultiplayer/LunaMultiplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_MasterServer
23 lines (18 loc) · 1.21 KB
/
Dockerfile_MasterServer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Build this image with: docker build --file Dockerfile_MasterServer -t lmpms:latest .
#Delete the image with the command: docker image rm lmpms:latest
#Create a container with: docker run -d -p 8700:8700/udp -p 8701:8701/tcp --restart=unless-stopped --name lmpms lmpms:latest
#Create a container with with specific ports: docker run -d -p 8700:8700 -p 8701:8701 -e PORT=8700 -e HTTP_PORT=8701 --name lmpms lmpms:latest
#Attach to a container with: docker exec -it lmpms /bin/ash
#When inside a container, you can dettach with: CONTROL+P+Q
#Check logs with: docker logs -f lmpms
#Stop a container with: docker stop lmpms
#Start a container with: docker start lmpms
#Remove a container with: docker container rm lmpms
FROM alpine:3.9
RUN apk add --no-cache mono --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN apk add libgdiplus-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
#RUN cd /usr/lib && sudo ln -s libgdiplus.so gdiplus.dll
ENV LMP_URL https://luna-masterserver-endpoint.glitch.me/latest
ENV PORT 8700
ENV HTTP_PORT 8701
CMD rm -f latest 2> /dev/null && wget $LMP_URL && unzip -o latest && cd LMPMasterServer && mono MasterServer.exe -p $PORT -g $HTTP_PORT