added forge & updates neoforged
All checks were successful
Build and Push Minecraft Docker Images on Debian-base update / poll-debian-base-and-detect-changes (push) Successful in 1m11s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push fabric (push) Successful in 17s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-forge (push) Successful in 3m12s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 4m3s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 23s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push forge (push) Successful in 4m42s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push neoforged (push) Successful in 5m57s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 1m35s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-neoforged (push) Successful in 2m32s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 11s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 2m28s

prep for bukket servers
This commit is contained in:
2025-12-18 16:14:49 -08:00
parent 00171463be
commit 444ca5bea7
16 changed files with 624 additions and 8 deletions

41
testing-forge/Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
FROM gitea.fithwum.tech/fithwum/debian-base:bookworm
LABEL maintainer="fithwum"
ENV ACCEPT_EULA=""
ENV GAME_PORT=""
ENV MC_VERSION=""
ENV FORGE_VERSION=""
ENV XMX_SIZE=""
ENV XMS_SIZE=""
ENV XMN_SIZE=""
# URL's for files
ARG INSTALL_SCRIPT=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/forge/Install_Script.sh
# Install java-17 & Dependencies.
RUN apt-get -y update && apt-get -y autoclean && apt-get -y autoremove \
&& apt-get install -y wget
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb
RUN apt-get -y update && apt-get -y --fix-broken install \
&& apt-get install -y --no-install-recommends msopenjdk-21 bzip2 lsb-release screen jq \
&& 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 \
&& cd /MCserver
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" ]

View File

@@ -0,0 +1,96 @@
#!/bin/bash
# Copyright (c) 2022 fithwum
# All rights reserved
MC_DIR=/MCserver
# Main Install Links
INSTALLER_FILE=https://maven.minecraftforge.net/net/minecraftforge/forge/$MC_VERSION-$FORGE_VERSION/forge-$MC_VERSION-$FORGE_VERSION-installer.jar
MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/neoforged/run.sh
# Main install (Debian).
# Check for server files and download if needed.
if [ -e $MC_DIR/forge-$MC_VERSION-$FORGE_VERSION-installer.jar ]
then
echo " "
echo "INFO ! forge-$MC_VERSION-$FORGE_VERSION-installer.jar found starting now."
else
echo " "
echo "WARNING ! forge-$MC_VERSION-$FORGE_VERSION-installer.jar is out of date/missing ... will download now."
echo " "
echo "INFO ! Cleaning old files."
cd $MC_DIR
rm -fr neoforge-*.jar run-*.sh /libraries
wget --no-cache --show-progress --progress=bar:force:noscroll $INSTALLER_FILE -O forge-$MC_VERSION-$FORGE_VERSION-installer.jar
chmod +x forge-$MC_VERSION-$FORGE_VERSION-installer.jar
java -jar forge-$MC_VERSION-$FORGE_VERSION-installer.jar --installServer
mv run.sh run-$MC_VERSION-$FORGE_VERSION.sh
chmod +x run-$MC_VERSION-$FORGE_VERSION.sh
cd ..
fi
# Check for EULA
if [ ! -f $MC_DIR/eula.txt ]; then
:
else
if [ "$ACCEPT_EULA" == "false" ]; then
if grep -rq 'eula=true' $MC_DIR/eula.txt; then
sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt
fi
echo " "
echo "WARNING ! EULA not accepted, you must accept the EULA"
echo " to start the Server, putting server in sleep mode"
sleep infinity
fi
fi
if [ ! -f $MC_DIR/eula.txt ]; then
echo " "
echo "WARNING ! EULA not found please stand by..."
sleep 5
fi
if [ "$ACCEPT_EULA" == "true" ]; then
if grep -rq 'eula=false' $MC_DIR/eula.txt; then
sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt
echo " "
echo "INFO ! EULA accepted, server restarting, please wait..."
sleep 1
cd $MC_DIR
exec ./run-$MC_VERSION-$FORGE_VERSION.sh nogui
exit 0
fi
elif [ "$ACCEPT_EULA" == "false" ]; then
echo " "
echo "WARNING ! EULA not accepted, you must accept the EULA"
echo " to start the Server, putting server in sleep mode"
sleep infinity
else
echo " "
echo "WARNING ! Something went wrong, please check EULA variable"
fi
echo "INFO ! Setting game port."
if [ -f $MC_DIR/server.properties ]; then
sed -i '/server-port='*'/c\server-port='$GAME_PORT'' $MC_DIR/server.properties
fi
echo "INFO ! Setting java settings."
cat > $MC_DIR/user_jvm_args.txt <<EOF
-Xmx${XMX_SIZE}
-Xms${XMS_SIZE}
EOF
[ -n "$XMN_SIZE" ] && echo "-Xmn${XMN_SIZE}" >> $MC_DIR/user_jvm_args.txt
# Set permissions.
chown 99:100 -R $MC_DIR
chmod 777 -R $MC_DIR
sleep 1
# Run Minecraft server.
echo " "
echo "INFO ! Starting Minecraft Server $MC_VERSION-$FORGE_VERSION"
cd $MC_DIR
exec ./run-$MC_VERSION-$FORGE_VERSION.sh nogui
exit