From 88d6bd122aeb0d6e1f3e669255ecf9f4055c0dac Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 7 Oct 2020 00:27:28 +0200 Subject: [PATCH] initial commit --- Dockerfile | 11 +++++++++++ README.md | 15 +++++++++++++++ build.sh | 3 +++ docker-compose.yml | 8 ++++++++ server.properties | 38 ++++++++++++++++++++++++++++++++++++++ setup-server.sh | 27 +++++++++++++++++++++++++++ 6 files changed, 102 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100755 build.sh create mode 100644 docker-compose.yml create mode 100644 server.properties create mode 100755 setup-server.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf9d059 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM java + +EXPOSE 25565/tcp +EXPOSE 25565/udp + +RUN mkdir /data && mkdir /stuff +COPY server.properties /stuff/server.properties +COPY setup-server.sh /stuff/setup-server.sh +WORKDIR /data + +CMD /stuff/setup-server.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..7cd47a3 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +Step 1: Download installer from [here](https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-14.23.5.2854/forge-1.12.2-14.23.5.2854-installer.jar) + +Step 2: Run `java -jar forge-1.12.2-14.23.5.2854-installer.jar --installServer` + +Step 3: Remove the installer + +Step 4: Download RLCraft from [here](https://media.forgecdn.net/files/2935/323/RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip) + +Step 5: Extract RLCraft zip in server dir with `unzip RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip -d .` + +Step 6: Remove RLCraft Zip + +Step 7: Replace eula.txt and server.properties + +Step 8: Run server with `java -jar forge-1.12.2-14.23.5.2854.jar nogui` \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a523809 --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sudo docker build -t djeeberjr/rlcraft . diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..64dd8f3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.8" +services: + rl-craft: + image: "djeeberjr/rlcraft" + volumes: + - ./test:/data + ports: + - 25565:25565 \ No newline at end of file diff --git a/server.properties b/server.properties new file mode 100644 index 0000000..2cde4eb --- /dev/null +++ b/server.properties @@ -0,0 +1,38 @@ +#Minecraft server properties +#Tue Oct 06 23:41:57 CEST 2020 +max-tick-time=-1 +generator-settings= +allow-nether=true +force-gamemode=false +gamemode=0 +enable-query=false +player-idle-timeout=0 +difficulty=3 +spawn-monsters=true +op-permission-level=4 +pvp=true +snooper-enabled=true +level-type=DEFAULT +hardcore=false +enable-command-block=false +max-players=20 +network-compression-threshold=256 +resource-pack-sha1= +max-world-size=29999984 +server-port=25565 +server-ip= +spawn-npcs=true +allow-flight=true +level-name=world +view-distance=6 +resource-pack= +spawn-animals=true +white-list=false +generate-structures=true +online-mode=true +max-build-height=256 +level-seed= +prevent-proxy-connections=false +use-native-transport=true +motd=RLCraft v1.12.2 +enable-rcon=false diff --git a/setup-server.sh b/setup-server.sh new file mode 100755 index 0000000..58ca893 --- /dev/null +++ b/setup-server.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +setupServer(){ + wget https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-14.23.5.2854/forge-1.12.2-14.23.5.2854-installer.jar + wget https://media.forgecdn.net/files/2935/323/RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip + java -jar forge-1.12.2-14.23.5.2854-installer.jar --installServer + unzip RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip -d . + rm forge-1.12.2-14.23.5.2854-installer.jar RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip + echo "eula=true" > eula.txt + cp /stuff/server.properties /data/server.properties +} + +startServer(){ + java -jar forge-1.12.2-14.23.5.2854.jar nogui +} + +if [ ! -f "/data/forge-1.12.2-14.23.5.2854.jar" ]; then + echo "Setting up server" + setupServer +fi + +echo "start server" +startServer + +