diff --git a/fabric/fabric-1.20.1/Dockerfile b/fabric/fabric-1.20.1/Dockerfile new file mode 100644 index 0000000..16ca025 --- /dev/null +++ b/fabric/fabric-1.20.1/Dockerfile @@ -0,0 +1,32 @@ +FROM fithwum/debian-base:bullseye +LABEL maintainer "fithwum" + +ENV ACCEPT_EULA="false" +ENV GAME_PORT=25565 + +# URL's for files +ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-1.20.1/files/Install_Script.sh + +# Install java-17 & Dependencies. +RUN apt-get -y update \ + && apt-get -y --fix-broken install \ + && apt-get install -y software-properties-common openjdk-17-jdk \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && update-ca-certificates -f; + +# Folder creation. +RUN mkdir -p /MCserver /MCtemp \ + && chmod 777 -R /MCserver /MCtemp \ + && chown 99:100 -R /MCserver /MCtemp +ADD "${INSTALL_SCRIPT}" /MCtemp +RUN chmod +x /MCtemp/Install_Script.sh + +# Directory where data is stored +VOLUME /MCserver + +# 25565 Default. +EXPOSE 25565/udp 25565/tcp + +# Run command +CMD [ "/bin/bash", "./MCtemp/Install_Script.sh" ] diff --git a/fabric/fabric-1.20.1/files/Install_Script.sh b/fabric/fabric-1.20.1/files/Install_Script.sh new file mode 100644 index 0000000..f2ea522 --- /dev/null +++ b/fabric/fabric-1.20.1/files/Install_Script.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# Copyright (c) 2022 fithwum +# All rights reserved + +# Display setup +export DISPLAY=0 + +# Variables. +echo " " +echo "INFO ! Checking for latest Minecraft Server version." +MC_VERSION_OLD=1.20 +FABRIC_VERSION_OLD=0.14.19 +MC_VERSION=1.20.1 +FABRIC_VERSION=0.14.22 +INSTALLER_VERSION=0.11.2 + +SERVER_FILE=https://meta.fabricmc.net/v2/versions/loader/${MC_VERSION}/${FABRIC_VERSION}/${INSTALLER_VERSION}/server/jar +MC_RUN_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/files/run-fabric.sh + +EULA_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-${MC_VERSION}/files/eula.txt +OPS_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-${MC_VERSION}/files/ops.json +WHITELIST_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-${MC_VERSION}/files/whitelist.json + +# Main install (Debian). +# Check for files in /MCserver and download if needed. +if [ -e /MCserver/fabric-${MC_VERSION}-${FABRIC_VERSION}.jar ] + then + echo " " + echo "INFO ! fabric-${MC_VERSION}-${FABRIC_VERSION}.jar found starting now." + else + echo " " + echo "WARNING ! fabric-${MC_VERSION}-${FABRIC_VERSION}.jar is out of date/missing ... will download now." + echo " " + echo "INFO ! Cleaning old files." + mkdir /MCserver/old-server-versions + mv /MCserver/fabric-${MC_VERSION_OLD}-${FABRIC_VERSION}.jar /MCserver/old-server-versions/ + mv /MCserver/fabric-${MC_VERSION}-${FABRIC_VERSION_OLD}.jar /MCserver/old-server-versions/ + wget --no-cache ${SERVER_FILE} -O /MCserver/fabric-${MC_VERSION}-${FABRIC_VERSION}.jar +fi + +sleep 1 + +# Looking for run_${MC_VERSION}.sh +if [ -e /MCserver/run-fabric_${MC_VERSION}.sh ] + then + echo " " + echo "INFO ! run-fabric_${MC_VERSION}.sh found ... will use existing file." + else + echo " " + echo "WARNING ! run-fabric_${MC_VERSION_OLD}.sh is out of date/missing ... will download now." + mv /MCserver/run-fabric_${MC_VERSION_OLD}.sh /MCserver/old-server-versions/ + wget --no-cache ${MC_RUN_FILE} -O /MCserver/run-fabric_${MC_VERSION}.sh +fi + +# Check for needed files +if [ -e /MCserver/eula.txt ] + then + echo " " + echo "INFO ! eula.txt found ... will use existing file." + else + echo " " + echo "WARNING ! eula.txt is missing ... will download now." + wget --no-cache ${EULA_FILE} -O /MCserver/eula.txt +fi + +if [ -e /MCserver/ops.json ] + then + echo " " + echo "INFO ! ops.json found ... will use existing file." + else + echo " " + echo "WARNING ! ops.json is missing ... will download now." + wget --no-cache ${OPS_FILE} -O /MCserver/ops.json +fi + +if [ -e /MCserver/whitelist.json ] + then + echo " " + echo "INFO ! whitelist.json found ... will use existing file." + else + echo " " + echo "WARNING ! whitelist.json is missing ... will download now." + wget --no-cache ${WHITELIST_FILE} -O /MCserver/whitelist.json +fi + +sleep 1 + +# Set permissions. +chown 99:100 -R /MCserver +chmod 777 -R /MCserver +chmod +x /MCserver/run-fabric_${MC_VERSION}.sh + +sleep 1 + +# Run Minecraft server. +echo " " +echo "INFO ! Starting Minecraft Server ${MC_VERSION}" +exec /MCserver/run-fabric_${MC_VERSION}.sh --dataPath=/MCserver + +exit diff --git a/fabric/fabric-1.20.1/files/eula.txt b/fabric/fabric-1.20.1/files/eula.txt new file mode 100644 index 0000000..9721c7a --- /dev/null +++ b/fabric/fabric-1.20.1/files/eula.txt @@ -0,0 +1,3 @@ +#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). +#Mon Jul 13 15:34:07 PDT 2020 +eula=true diff --git a/fabric/fabric-1.20.1/files/ops.json b/fabric/fabric-1.20.1/files/ops.json new file mode 100644 index 0000000..33686a5 --- /dev/null +++ b/fabric/fabric-1.20.1/files/ops.json @@ -0,0 +1,14 @@ +[ + { + "uuid": "e9191443-8706-461c-a4a9-6b12b86f7fc0", + "name": "fithwum", + "level": 4, + "bypassesPlayerLimit": true + }, + { + "uuid": "fb505f65-bfb5-45f7-8e16-16ce5ef09eb2", + "name": "Lacarthian", + "level": 4, + "bypassesPlayerLimit": true + } +] \ No newline at end of file diff --git a/fabric/fabric-1.20.1/files/whitelist.json b/fabric/fabric-1.20.1/files/whitelist.json new file mode 100644 index 0000000..8db31e4 --- /dev/null +++ b/fabric/fabric-1.20.1/files/whitelist.json @@ -0,0 +1,38 @@ +[ + { + "uuid": "9b8d4ecf-beae-4277-ba52-7c9d25bb1968", + "name": "DHRmike" + }, + { + "uuid": "6218840a-7cba-4eb6-aec2-5246f2152c8a", + "name": "lordWiseman28" + }, + { + "uuid": "e9191443-8706-461c-a4a9-6b12b86f7fc0", + "name": "fithwum" + }, + { + "uuid": "62bb6a62-c176-4ad7-a49d-e5b2ce0954cf", + "name": "OzyWizard" + }, + { + "uuid": "fb505f65-bfb5-45f7-8e16-16ce5ef09eb2", + "name": "Lacarthian" + }, + { + "uuid": "a90f9d4e-33d5-4855-9be5-de025b707f54", + "name": "Drakaul" + }, + { + "uuid": "f4d00276-62f4-4d30-a085-998c71916ecd", + "name": "___ORANGE___" + }, + { + "uuid": "27b719c4-daf3-429b-af2d-da3aab113f79", + "name": "Rekage_" + }, + { + "uuid": "d02f2de9-d414-42e2-b2fd-ec18bc2625ef", + "name": "Izzy761" + } +] \ No newline at end of file diff --git a/fabric/fabric-1.20/Dockerfile b/fabric/fabric-1.20/Dockerfile new file mode 100644 index 0000000..4f4cc52 --- /dev/null +++ b/fabric/fabric-1.20/Dockerfile @@ -0,0 +1,32 @@ +FROM fithwum/debian-base:bullseye +LABEL maintainer "fithwum" + +ENV ACCEPT_EULA="false" +ENV GAME_PORT=25565 + +# URL's for files +ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-1.20/files/Install_Script.sh + +# Install java-17 & Dependencies. +RUN apt-get -y update \ + && apt-get -y --fix-broken install \ + && apt-get install -y software-properties-common openjdk-17-jdk \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && update-ca-certificates -f; + +# Folder creation. +RUN mkdir -p /MCserver /MCtemp \ + && chmod 777 -R /MCserver /MCtemp \ + && chown 99:100 -R /MCserver /MCtemp +ADD "${INSTALL_SCRIPT}" /MCtemp +RUN chmod +x /MCtemp/Install_Script.sh + +# Directory where data is stored +VOLUME /MCserver + +# 25565 Default. +EXPOSE 25565/udp 25565/tcp + +# Run command +CMD [ "/bin/bash", "./MCtemp/Install_Script.sh" ] diff --git a/fabric/fabric-1.20/files/Install_Script.sh b/fabric/fabric-1.20/files/Install_Script.sh new file mode 100644 index 0000000..3268e53 --- /dev/null +++ b/fabric/fabric-1.20/files/Install_Script.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# Copyright (c) 2022 fithwum +# All rights reserved + +# Display setup +export DISPLAY=0 + +# Variables. +echo " " +echo "INFO ! Checking for latest Minecraft Server version." +MC_VERSION_OLD=1.19.4 +FABRIC_VERSION_OLD=0.14.19 +MC_VERSION=1.20 +FABRIC_VERSION=0.14.22 +INSTALLER_VERSION=0.11.2 + +SERVER_FILE=https://meta.fabricmc.net/v2/versions/loader/${MC_VERSION}/${FABRIC_VERSION}/${INSTALLER_VERSION}/server/jar +MC_RUN_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/files/run-fabric.sh + +EULA_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-${MC_VERSION}/files/eula.txt +OPS_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-${MC_VERSION}/files/ops.json +WHITELIST_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/fabric/fabric-${MC_VERSION}/files/whitelist.json + +# Main install (Debian). +# Check for files in /MCserver and download if needed. +if [ -e /MCserver/fabric-${MC_VERSION}-${FABRIC_VERSION}.jar ] + then + echo " " + echo "INFO ! fabric-${MC_VERSION}-${FABRIC_VERSION}.jar found starting now." + else + echo " " + echo "WARNING ! fabric-${MC_VERSION}-${FABRIC_VERSION}.jar is out of date/missing ... will download now." + echo " " + echo "INFO ! Cleaning old files." + mkdir /MCserver/old-server-versions + mv /MCserver/fabric-${MC_VERSION_OLD}-${FABRIC_VERSION}.jar /MCserver/old-server-versions/ + mv /MCserver/fabric-${MC_VERSION}-${FABRIC_VERSION_OLD}.jar /MCserver/old-server-versions/ + wget --no-cache ${SERVER_FILE} -O /MCserver/fabric-${MC_VERSION}-${FABRIC_VERSION}.jar +fi + +sleep 1 + +# Looking for run_${MC_VERSION}.sh +if [ -e /MCserver/run-fabric_${MC_VERSION}.sh ] + then + echo " " + echo "INFO ! run-fabric_${MC_VERSION}.sh found ... will use existing file." + else + echo " " + echo "WARNING ! run-fabric_${MC_VERSION_OLD}.sh is out of date/missing ... will download now." + mv /MCserver/run-fabric_${MC_VERSION_OLD}.sh /MCserver/old-server-versions/ + wget --no-cache ${MC_RUN_FILE} -O /MCserver/run-fabric_${MC_VERSION}.sh +fi + +# Check for needed files +if [ -e /MCserver/eula.txt ] + then + echo " " + echo "INFO ! eula.txt found ... will use existing file." + else + echo " " + echo "WARNING ! eula.txt is missing ... will download now." + wget --no-cache ${EULA_FILE} -O /MCserver/eula.txt +fi + +if [ -e /MCserver/ops.json ] + then + echo " " + echo "INFO ! ops.json found ... will use existing file." + else + echo " " + echo "WARNING ! ops.json is missing ... will download now." + wget --no-cache ${OPS_FILE} -O /MCserver/ops.json +fi + +if [ -e /MCserver/whitelist.json ] + then + echo " " + echo "INFO ! whitelist.json found ... will use existing file." + else + echo " " + echo "WARNING ! whitelist.json is missing ... will download now." + wget --no-cache ${WHITELIST_FILE} -O /MCserver/whitelist.json +fi + +sleep 1 + +# Set permissions. +chown 99:100 -R /MCserver +chmod 777 -R /MCserver +chmod +x /MCserver/run-fabric_${MC_VERSION}.sh + +sleep 1 + +# Run Minecraft server. +echo " " +echo "INFO ! Starting Minecraft Server ${MC_VERSION}" +exec /MCserver/run-fabric_${MC_VERSION}.sh --dataPath=/MCserver + +exit diff --git a/fabric/fabric-1.20/files/eula.txt b/fabric/fabric-1.20/files/eula.txt new file mode 100644 index 0000000..9721c7a --- /dev/null +++ b/fabric/fabric-1.20/files/eula.txt @@ -0,0 +1,3 @@ +#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). +#Mon Jul 13 15:34:07 PDT 2020 +eula=true diff --git a/fabric/fabric-1.20/files/ops.json b/fabric/fabric-1.20/files/ops.json new file mode 100644 index 0000000..33686a5 --- /dev/null +++ b/fabric/fabric-1.20/files/ops.json @@ -0,0 +1,14 @@ +[ + { + "uuid": "e9191443-8706-461c-a4a9-6b12b86f7fc0", + "name": "fithwum", + "level": 4, + "bypassesPlayerLimit": true + }, + { + "uuid": "fb505f65-bfb5-45f7-8e16-16ce5ef09eb2", + "name": "Lacarthian", + "level": 4, + "bypassesPlayerLimit": true + } +] \ No newline at end of file diff --git a/fabric/fabric-1.20/files/whitelist.json b/fabric/fabric-1.20/files/whitelist.json new file mode 100644 index 0000000..8db31e4 --- /dev/null +++ b/fabric/fabric-1.20/files/whitelist.json @@ -0,0 +1,38 @@ +[ + { + "uuid": "9b8d4ecf-beae-4277-ba52-7c9d25bb1968", + "name": "DHRmike" + }, + { + "uuid": "6218840a-7cba-4eb6-aec2-5246f2152c8a", + "name": "lordWiseman28" + }, + { + "uuid": "e9191443-8706-461c-a4a9-6b12b86f7fc0", + "name": "fithwum" + }, + { + "uuid": "62bb6a62-c176-4ad7-a49d-e5b2ce0954cf", + "name": "OzyWizard" + }, + { + "uuid": "fb505f65-bfb5-45f7-8e16-16ce5ef09eb2", + "name": "Lacarthian" + }, + { + "uuid": "a90f9d4e-33d5-4855-9be5-de025b707f54", + "name": "Drakaul" + }, + { + "uuid": "f4d00276-62f4-4d30-a085-998c71916ecd", + "name": "___ORANGE___" + }, + { + "uuid": "27b719c4-daf3-429b-af2d-da3aab113f79", + "name": "Rekage_" + }, + { + "uuid": "d02f2de9-d414-42e2-b2fd-ec18bc2625ef", + "name": "Izzy761" + } +] \ No newline at end of file