From de866a322ffc55e93c27d055efe4937d58bc19ba Mon Sep 17 00:00:00 2001 From: Sharif Nassar Date: Sun, 3 May 2020 14:30:12 -0700 Subject: [PATCH 1/7] Add `resource-pack-sha1` to server.properties (#519) --- server.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/server.properties b/server.properties index 445e9027..340ba9df 100644 --- a/server.properties +++ b/server.properties @@ -22,6 +22,7 @@ snooper-enabled=true texture-pack= online-mode=true resource-pack= +resource-pack-sha1= pvp=true difficulty=1 enable-command-block=true From b66629b951d546f9bb12564424b7506f11726bd7 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 3 May 2020 11:12:29 -0500 Subject: [PATCH 2/7] Added helper script for building multiarch image --- build-multiarch.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 build-multiarch.sh diff --git a/build-multiarch.sh b/build-multiarch.sh new file mode 100644 index 00000000..4694c66e --- /dev/null +++ b/build-multiarch.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# manually purge any pre-existing manifest list +# since docker manifest command lacks a "remove" operation +rm -rf ~/.docker/manifests/docker.io_itzg_minecraft-server-multiarch + +export DOCKER_BUILDKIT=1 + +docker build --platform linux/arm64 -t itzg/minecraft-server:arm64 . +docker push itzg/minecraft-server:arm64 + +armv7tag=armv7-buildkit +armv7workDir=/tmp/armv7-$$ +git worktree add $armv7workDir armv7 +# sub-shell for build of armv7 +( + cd $armv7workDir + docker build --platform linux/arm/v7 -t itzg/minecraft-server:$armv7tag . + docker push itzg/minecraft-server:$armv7tag +) +git worktree remove $armv7workDir + +docker pull itzg/minecraft-server +# use the rpi build one for now since armv7-buildkit is giving ABI mismatch on curl +docker pull itzg/minecraft-server:armv7 + +docker manifest create itzg/minecraft-server:multiarch \ + itzg/minecraft-server \ + itzg/minecraft-server:armv7 \ + itzg/minecraft-server:arm64 + +docker manifest inspect itzg/minecraft-server:multiarch + +docker manifest push -p itzg/minecraft-server:multiarch From 5c0a3a64abf30a0c26dcc9dc849fdaa4d87cbab0 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 8 May 2020 18:01:37 -0500 Subject: [PATCH 3/7] Upgraded mc-server-runner to 1.4.3 to fix curse instance mod cleanup --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 35a04eab..6204c854 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ - --var version=1.4.2 --var app=mc-server-runner --file {{.app}} \ + --var version=1.4.3 --var app=mc-server-runner --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ From 89fa3ff8feba32f6951e56b6044d5b1e2c617205 Mon Sep 17 00:00:00 2001 From: hejamu Date: Tue, 12 May 2020 01:53:29 +0200 Subject: [PATCH 4/7] Short hotfix until version helper function is done (#520) --- start-deployBukkitSpigot | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/start-deployBukkitSpigot b/start-deployBukkitSpigot index 05e29994..bd3639b6 100644 --- a/start-deployBukkitSpigot +++ b/start-deployBukkitSpigot @@ -20,7 +20,16 @@ function buildSpigotFromSource { cat /data/spigot_build.log exit 1 fi - mv craftbukkit-*.jar /data/${SERVER} + if [ $VANILLA_VERSION != "1.15.2" -a \ + $VANILLA_VERSION != "1.15.1" -a \ + $VANILLA_VERSION != "1.15" -a \ + $VANILLA_VERSION != "1.14.4" -a \ + $VANILLA_VERSION != "1.14.3" -a \ + $VANILLA_VERSION != "1.14.2" -a \ + $VANILLA_VERSION != "1.14.1" -a \ + $VANILLA_VERSION != "1.14" ]; then + mv craftbukkit-*.jar /data/${SERVER} + fi log "Cleaning up" rm -rf /data/temp cd /data From d24690ab8c2788c81e574993ce0b374d827f8cfb Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 11 May 2020 18:54:28 -0500 Subject: [PATCH 5/7] Used versionLessThan to simplify buildSpigotFromSource check --- start-deployBukkitSpigot | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/start-deployBukkitSpigot b/start-deployBukkitSpigot index bd3639b6..fa51d216 100644 --- a/start-deployBukkitSpigot +++ b/start-deployBukkitSpigot @@ -20,14 +20,7 @@ function buildSpigotFromSource { cat /data/spigot_build.log exit 1 fi - if [ $VANILLA_VERSION != "1.15.2" -a \ - $VANILLA_VERSION != "1.15.1" -a \ - $VANILLA_VERSION != "1.15" -a \ - $VANILLA_VERSION != "1.14.4" -a \ - $VANILLA_VERSION != "1.14.3" -a \ - $VANILLA_VERSION != "1.14.2" -a \ - $VANILLA_VERSION != "1.14.1" -a \ - $VANILLA_VERSION != "1.14" ]; then + if versionLessThan "1.14"; then mv craftbukkit-*.jar /data/${SERVER} fi log "Cleaning up" From b271b529eaf942825d7282f3ba6d0cbe9f8091e0 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 11 May 2020 20:14:01 -0500 Subject: [PATCH 6/7] Improved handling of building bukkit vs spigot --- start-deployBukkitSpigot | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/start-deployBukkitSpigot b/start-deployBukkitSpigot index fa51d216..fec3f655 100644 --- a/start-deployBukkitSpigot +++ b/start-deployBukkitSpigot @@ -5,6 +5,11 @@ set -e function buildSpigotFromSource { + if [[ ${TYPE^^} = *BUKKIT ]] && ! versionLessThan "1.14"; then + log "ERR craftbukkit build is only supported for versions less than 1.14" + exit 1 + fi + log "Building Spigot $VANILLA_VERSION from source, might take a while, get some coffee" rm -rf /data/temp mkdir /data/temp @@ -15,14 +20,24 @@ function buildSpigotFromSource { logn '' curl -sSL -o /data/temp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \ java $jvmOpts -jar /data/temp/BuildTools.jar --rev $VANILLA_VERSION 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; log "done" - if ! mv spigot-*.jar /data/spigot_server.jar; then - log "ERR failed to build Spigot" - cat /data/spigot_build.log - exit 1 - fi - if versionLessThan "1.14"; then - mv craftbukkit-*.jar /data/${SERVER} - fi + + case ${TYPE^^} in + SPIGOT) + if ! mv spigot-*.jar /data/${SERVER}; then + log "ERR failed to build Spigot" + cat /data/spigot_build.log + exit 1 + fi + ;; + *BUKKIT) + if ! mv craftbukkit-*.jar /data/${SERVER}; then + log "ERR failed to build Spigot" + cat /data/spigot_build.log + exit 1 + fi + ;; + esac + log "Cleaning up" rm -rf /data/temp cd /data @@ -75,7 +90,7 @@ case "$TYPE" in esac if [ ! -f $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then - if [[ "$BUILD_SPIGOT_FROM_SOURCE" = TRUE || "$BUILD_SPIGOT_FROM_SOURCE" = true || "$BUILD_FROM_SOURCE" = TRUE || "$BUILD_FROM_SOURCE" = true ]]; then + if isTrue "$BUILD_SPIGOT_FROM_SOURCE" || isTrue "$BUILD_FROM_SOURCE"; then buildSpigotFromSource else downloadSpigot From ede58d91597fb2fb5a0de36b4b78497b29b3f753 Mon Sep 17 00:00:00 2001 From: Mitchell Skaggs Date: Mon, 18 May 2020 19:55:32 -0500 Subject: [PATCH 7/7] Update flags as of 5/2/2020 (#534) --- start-minecraftFinalSetup | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index c17ce18c..6b1e858c 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -135,24 +135,25 @@ if isTrue "${USE_AIKAR_FLAGS}"; then fi JVM_XX_OPTS="${JVM_XX_OPTS} - -XX:+UseG1GC -XX:+ParallelRefProcEnabled + -XX:+UseG1GC + -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC - -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:G1NewSizePercent=${G1NewSizePercent} -XX:G1MaxNewSizePercent=${G1MaxNewSizePercent} -XX:G1HeapRegionSize=${G1HeapRegionSize} -XX:G1ReservePercent=${G1ReservePercent} -XX:G1HeapWastePercent=5 - -XX:G1MixedGCCountTarget=8 + -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=${InitiatingHeapOccupancyPercent} -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 + -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 - -Dusing.aikars.flags=true + -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true " fi