build: properly implemented docker build, and created a Powershell script for it

This commit is contained in:
Yannik Bretschneider 2021-06-05 04:14:55 +02:00
parent 70754bfe98
commit 28ce5efd57
2 changed files with 33 additions and 2 deletions

View File

@ -1,4 +1,32 @@
FROM adoptopenjdk:15-jre-hotspot
FROM adoptopenjdk:16-jre-hotspot
RUN mkdir logs
COPY Server/build/libs/Server.jar Server.jar
CMD ["java", "-jar", "Server.jar", "-v"]
COPY configs/asgard.scenario.json default/asgard.scenario.json
COPY configs/marvelheros.character.json default/marvelheroes.character.json
COPY configs/matchconfig_1.game.json default/matchconfig.game.json
ARG MMU_LOG_LEVEL=3
ARG MMU_CONF_MATCH=default/matchconfig.game.json
ARG MMU_CONF_CHARS=default/marvelheroes.character.json
ARG MMU_CONF_SCENARIO=default/asgard.scenario.json
ARG MMU_CHECK_CONF=false
ARG MMU_REPLAY_DIR=/replays
ARG EXTRA_ARGS
ENV MMU_LOG_LEVEL=${MMU_LOG_LEVEL}
ENV MMU_CONF_MATCH=${MMU_CONF_MATCH}
ENV MMU_CONF_CHARS=${MMU_CONF_CHARS}
ENV MMU_CONF_SCENARIO=${MMU_CONF_SCENARIO}
ENV MMU_REPLAY_DIR=${MMU_REPLAY_DIR}
ENV EXTRA_ARGS=${EXTRA_ARGS}
CMD java -jar Server.jar --log-level $MMU_LOG_LEVEL --conf-match $MMU_CONF_MATCH --conf-chars $MMU_CONF_CHARS --conf-scenario $MMU_CONF_SCENARIO --replay ${MMU_REPLAY_DIR} ${EXTRA_ARGS}

3
rebuildDocker.ps1 Normal file
View File

@ -0,0 +1,3 @@
.\gradlew Server:jar
docker build -t server-testbuild .
docker run --rm -e "MMU_LOG_LEVEL=5" -p 1218:1218 server-testbuild