structure changes and update fixes & testing new base image
Some checks failed
Build and Push Minecraft Docker Images on Debian-base update / poll-debian-base-and-detect-changes (push) Successful in 10s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push fabric (push) Successful in 13s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push forge (push) Successful in 1m10s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push neoforged (push) Successful in 1m21s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing (push) Failing after 1m35s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 1m1s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push bukkit (push) Successful in 2m37s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Has been skipped
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Has been skipped

This commit is contained in:
2025-12-20 08:12:24 -08:00
parent e9874e712b
commit ddf6461d89
33 changed files with 28 additions and 641 deletions

5
testing/CHANGES.md Normal file
View File

@@ -0,0 +1,5 @@
## 2025-12-20T15:42:40Z
- variable fixes (fithwum)
- EULA test & URL fixes (fithwum)
- EULA test (fithwum)

43
testing/Dockerfile Normal file
View File

@@ -0,0 +1,43 @@
FROM gitea.fithwum.tech/fithwum/debian-base:trixie
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/testing-vanilla/install_script.sh
# Install Dependencies.
RUN apt-get -y update \
&& apt-get install -y --no-install-recommends bzip2 lsb-release screen jq openjdk-21-jdk-headless \
&& 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" ]

View File

@@ -0,0 +1,3 @@
while true; do
java -server -Xmx500M -XX:MaxPermSize=128M -jar spigot_server.jar
done;

2
testing/Script/start.sh Normal file
View File

@@ -0,0 +1,2 @@
screen -S nameofscreen -d -m sh restart.sh

9
testing/build-info.json Normal file
View File

@@ -0,0 +1,9 @@
{
"version": "testing-vanilla",
"commit": "e33b177b42cccad6869e64461be53ca8093a3da2",
"build_time": "2025-12-20T15:43:23Z",
"image_tag": "gitea.fithwum.tech/fithwum/minecraft:testing-vanilla",
"digest": "gitea.fithwum.tech/fithwum/minecraft@sha256:526ecdab4774ea2288dc5c374fe751a3c3710a03c66c99b4b5a8df03b9d2e6b0",
"image_size": "1GB",
"image_size_bytes": 1136085308
}

86
testing/install_script.sh Normal file
View File

@@ -0,0 +1,86 @@
#!/bin/bash
# Copyright (c) 2022 fithwum
# All rights reserved
MC_DIR=/MCserver
EULA_FILE=$MC_DIR/eula.txt
EULA_MARKER=$MC_DIR/.eula_accepted
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
# Main install (Debian).
# Check for server files and download if needed.
if [ -e $MC_DIR/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 $MC_DIR/old-server-versions/
mv $MC_DIR/MCserver-*.jar $MC_DIR/old-server-versions/
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_SERVER_FILE -O $MC_DIR/MCserver-$MC_VERSION.jar
chmod +x $MC_DIR/MCserver-$MC_VERSION.jar
fi
# Looking for run-${MC_VERSION}.sh
if [ -e $MC_DIR/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."
mv $MC_DIR/run-*.sh $MC_DIR/old-server-versions/
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_RUN_FILE -O $MC_DIR/run-$MC_VERSION.sh
chmod +x $MC_DIR/run-$MC_VERSION.sh
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
# Wait briefly for installer/server to generate eula.txt
if [ ! -f "$EULA_FILE" ] && [ ! -f "$EULA_MARKER" ]; then
echo "INFO ! Waiting for EULA generation..."
sleep 5
fi
# If EULA already accepted once, never touch it again
if [ -f "$EULA_MARKER" ]; then
echo "INFO ! EULA previously accepted"
return 0 2>/dev/null || true
fi
# First-time decision
if [ "$ACCEPT_EULA" = "true" ]; then
echo "INFO ! Accepting EULA (one-time)"
sed -i 's/eula=false/eula=true/' "$EULA_FILE" 2>/dev/null \
|| echo "eula=true" > "$EULA_FILE"
touch "$EULA_MARKER"
elif [ "$ACCEPT_EULA" = "false" ]; then
echo "WARNING ! EULA not accepted on first run"
echo "WARNING ! Set ACCEPT_EULA=true to proceed"
sleep infinity
else
echo "ERROR ! ACCEPT_EULA must be set to true or false on first run"
sleep infinity
fi
# 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"
exec $MC_DIR/run-$MC_VERSION.sh --dataPath=$MC_DIR
exit

27
testing/run.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Copyright (c) 2020 fithwum
# All rights reserved
cd /MCserver
JAR=./MCserver-*.jar
# # Check if a screen session is already running
# if screen -list | grep -q "MCserver"; then
# echo "INFO ! A screen session for the Minecraft server is already running."
# else
# # Start the Minecraft server in a detached screen session
# echo "INFO ! Starting Minecraft Server in a screen session."
# screen -mS mcserver bash -c 'while true; do
# java -Xmx$XMX_SIZE -Xms$XMS_SIZE -Xmn$XMN_SIZE -jar $JAR nogui
# if [ $? -eq 0 ]; then
# break
# fi
# done'
# fi
while [ true ]; do
java -Xmx$XMX_SIZE -Xms$XMS_SIZE -Xmn$XMN_SIZE -jar $JAR nogui
if [ $? -eq 0 ]; then
break
fi
done

59
testing/server.properties Normal file
View File

@@ -0,0 +1,59 @@
#Minecraft server properties
#(File modification date and time)
enable-jmx-monitoring=false
rcon.port=25575
level-seed=
gamemode=survival
enable-command-block=false
enable-query=false
generator-settings={}
enforce-secure-profile=true
level-name=world
motd=A Minecraft Server
query.port=25565
pvp=true
generate-structures=true
max-chained-neighbor-updates=1000000
difficulty=easy
network-compression-threshold=256
max-tick-time=60000
require-resource-pack=false
use-native-transport=true
max-players=20
online-mode=true
enable-status=true
allow-flight=false
initial-disabled-packs=
broadcast-rcon-to-ops=true
view-distance=10
server-ip=
resource-pack-prompt=
allow-nether=true
server-port=$GAME_PORT_TCP
enable-rcon=false
sync-chunk-writes=true
op-permission-level=4
prevent-proxy-connections=false
hide-online-players=false
resource-pack=
entity-broadcast-range-percentage=100
simulation-distance=10
rcon.password=
player-idle-timeout=0
force-gamemode=false
rate-limit=0
hardcore=false
white-list=false
broadcast-console-to-ops=true
spawn-npcs=true
spawn-animals=true
log-ips=true
function-permission-level=2
initial-enabled-packs=vanilla
level-type=minecraft\:normal
text-filtering-config=
spawn-monsters=true
enforce-whitelist=false
spawn-protection=16
resource-pack-sha1=
max-world-size=29999984

12
testing/test.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Copyright (c) 2023 fithwum
# All rights reserved
MC_VERSION="1.14.4"
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')
echo "Server url: $MC_SERVER_FILE"
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_SERVER_FILE -O /mnt/Other/Dockers/minecraft/testing/server-$MC_VERSION.jar