commit 80c0f6ebefc4f7b7d46e856b48119e9597b81428 Author: Niklas Date: Fri Jan 29 00:39:59 2021 +0100 initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b83302f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM openjdk:8-jre + +EXPOSE 25565 + +# Updating container +RUN apt-get update && \ + apt-get install apt-utils --yes && \ + apt-get upgrade --yes --allow-remove-essential && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /minecraft + +RUN mkdir /data && \ + wget --content-disposition https://api.modpacks.ch/public/modpack/35/174/server/linux && \ + chmod u+x serverinstall_35_174 + +RUN yes | /minecraft/serverinstall_35_174 + +COPY startDocker.sh /minecraft/startDocker.sh + +RUN chmod +x startDocker.sh + +CMD /minecraft/startDocker.sh diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..af6e017 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.8" +services: + ftb-revelations: + build: . + ports: + - 25565:25565 + volumes: + - ./data:/data diff --git a/startDocker.sh b/startDocker.sh new file mode 100755 index 0000000..dbc2ecd --- /dev/null +++ b/startDocker.sh @@ -0,0 +1,22 @@ +#!/bin/bash +files=( + forge-1.12.2-14.23.5.2846-universal.jar + changeslogs + libraries + minecraft_server.1.12.2.jar + mods + scripts + version.json +) + +for linkedFile in "${files[@]}" +do + [ ! -f /data/$linkedFile ] && ln -s /minecraft/$linkedFile /data/$linkedFile +done + +[ ! -f /data/config ] && cp -r /minecraft/config /data/config + +echo "eula=true" > /data/eula.txt + +cd /data +java -server -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx6144M -Xms4096M -jar forge-1.12.2-14.23.5.2846-universal.jar nogui