mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
commit
bbdb2c9b36
@ -47,7 +47,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} \
|
||||
|
34
build-multiarch.sh
Normal file
34
build-multiarch.sh
Normal file
@ -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
|
@ -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
|
||||
|
@ -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,12 +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
|
||||
mv craftbukkit-*.jar /data/${SERVER}
|
||||
|
||||
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
|
||||
@ -73,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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user