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
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:
43
bukkit/Dockerfile
Normal file
43
bukkit/Dockerfile
Normal file
@@ -0,0 +1,43 @@
|
||||
FROM gitea.fithwum.tech/fithwum/debian-base:bookworm
|
||||
LABEL maintainer="fithwum"
|
||||
|
||||
# Environment Variables
|
||||
ENV ACCEPT_EULA=""
|
||||
ENV GAME_PORT=""
|
||||
ENV MC_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/vanilla/install_script.sh
|
||||
|
||||
# Install Dependencies.
|
||||
RUN apt-get -y update \
|
||||
&& apt-get install -y --no-install-recommends bzip2 lsb-release screen jq \
|
||||
&& apt-get -y --fix-broken install \
|
||||
&& apt-get -y autoclean \
|
||||
&& apt-get -y autoremove \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& update-ca-certificates -f;
|
||||
|
||||
# Install java
|
||||
RUN wget https://packages.microsoft.com/config/debian/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
|
||||
&& dpkg -i packages-microsoft-prod.deb \
|
||||
&& apt-get update && apt-get install -y msopenjdk-21 \
|
||||
&& apt-get -y update && apt-get -y --fix-broken install
|
||||
|
||||
# Folder creation.
|
||||
RUN mkdir -p /MCserver /MCtemp \
|
||||
&& chmod 777 -R /MCserver /MCtemp \
|
||||
&& chown 99:100 -R /MCserver /MCtemp
|
||||
|
||||
# Main script
|
||||
RUN wget "$INSTALL_SCRIPT" -O /MCtemp/install_script.sh \
|
||||
&& chmod +x /MCtemp/install_script.sh
|
||||
|
||||
# Directory where data is stored
|
||||
VOLUME /MCserver
|
||||
|
||||
# Run command
|
||||
CMD [ "/bin/bash", "./MCtemp/install_script.sh" ]
|
||||
103
bukkit/install_script.sh
Normal file
103
bukkit/install_script.sh
Normal file
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2022 fithwum
|
||||
# All rights reserved
|
||||
|
||||
VERSION_CHECK=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" | grep -Pom 1 '"url": "\K[^"]*'$MC_VERSION'.json')
|
||||
MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url')
|
||||
MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/vanilla/run.sh
|
||||
|
||||
rm -fr /MCserver/MCserver_*.jar
|
||||
rm -fr /MCserver/run_*.sh
|
||||
|
||||
# Main install (Debian).
|
||||
# Check for server files and download if needed.
|
||||
if [ -e /MCserver/MCserver-$MC_VERSION.jar ]
|
||||
then
|
||||
echo " "
|
||||
echo "INFO ! MCserver-$MC_VERSION.jar found starting now."
|
||||
else
|
||||
echo " "
|
||||
echo "WARNING ! MCserver-$MC_VERSION.jar is out of date/missing ... will download now."
|
||||
echo " "
|
||||
echo "INFO ! Cleaning old files."
|
||||
mkdir /MCserver/old-server-versions/
|
||||
mv /MCserver/MCserver-*.jar /MCserver/old-server-versions/
|
||||
mv /MCserver/run-*.sh /MCserver/old-server-versions/
|
||||
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_SERVER_FILE -O /MCserver/MCserver-$MC_VERSION.jar
|
||||
chmod +x /MCserver/MCserver-$MC_VERSION.jar
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
# Looking for run-${MC_VERSION}.sh
|
||||
if [ -e /MCserver/run-$MC_VERSION.sh ]
|
||||
then
|
||||
echo " "
|
||||
echo "INFO ! run-$MC_VERSION.sh found ... will use existing file."
|
||||
else
|
||||
echo " "
|
||||
echo "WARNING ! run.sh is out of date/missing ... will download now."
|
||||
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_RUN_FILE -O /MCserver/run-$MC_VERSION.sh
|
||||
chmod +x /MCserver/run-$MC_VERSION.sh
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
# Check for EULA
|
||||
if [ ! -f /MCserver/eula.txt ]; then
|
||||
:
|
||||
else
|
||||
if [ "$ACCEPT_EULA" == "false" ]; then
|
||||
if grep -rq 'eula=true' /MCserver/eula.txt; then
|
||||
sed -i '/eula=true/c\eula=false' /MCserver/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
|
||||
|
||||
sleep 1
|
||||
|
||||
if [ ! -f /MCserver/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' /MCserver/eula.txt; then
|
||||
sed -i '/eula=false/c\eula=true' /MCserver/eula.txt
|
||||
echo " "
|
||||
echo "INFO ! EULA accepted, server restarting, please wait..."
|
||||
sleep 1
|
||||
exec /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver
|
||||
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
|
||||
|
||||
sleep 1
|
||||
echo "INFO ! Setting game port."
|
||||
sed -i '/server-port='*'/c\server-port='$GAME_PORT'' /MCserver/server.properties
|
||||
sleep 1
|
||||
|
||||
# Set permissions.
|
||||
chown 99:100 -R /MCserver
|
||||
chmod 777 -R /MCserver
|
||||
|
||||
sleep 1
|
||||
|
||||
# Run Minecraft server.
|
||||
echo " "
|
||||
echo "INFO ! Starting Minecraft Server $MC_VERSION"
|
||||
exec /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver
|
||||
|
||||
exit
|
||||
13
bukkit/run.sh
Normal file
13
bukkit/run.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2022 fithwum
|
||||
# All rights reserved
|
||||
|
||||
cd /MCserver
|
||||
JAR=./MCserver-*.jar
|
||||
|
||||
while [ true ]; do
|
||||
java -Xmx$XMX_SIZE -Xms$XMS_SIZE -Xmn$XMN_SIZE -jar $JAR nogui
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user