From 111ca85c4fa11d44cda14ce2604b16168031ce16 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 28 Mar 2020 13:48:47 -0500 Subject: [PATCH 1/9] Upgraded mc-server-runner to 1.3.4 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 96660e95..6436ad12 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.3.3 --var app=mc-server-runner --file {{.app}} \ + --var version=1.3.4 --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 f49b967d5a76aed1a14d9d1f5514ec8709fc0cb7 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 28 Mar 2020 13:56:48 -0500 Subject: [PATCH 2/9] Added logging of given VERSION and TYPE --- start-configuration | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start-configuration b/start-configuration index 28d1efe3..aa014998 100644 --- a/start-configuration +++ b/start-configuration @@ -47,7 +47,6 @@ fi export SERVER_PROPERTIES=/data/server.properties export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json -log "Checking version information." case "X$VERSION" in X|XLATEST|Xlatest) export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'` @@ -62,12 +61,13 @@ case "X$VERSION" in export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'` ;; esac +log "Resolved version given ${VERSION} into ${VANILLA_VERSION}" cd /data export ORIGINAL_TYPE=${TYPE^^} -log "Checking type information." +log "Resolving type given ${TYPE}" case "${TYPE^^}" in *BUKKIT|SPIGOT) exec /start-deployBukkitSpigot $@ From f24827f558cd67b04b9d7f6784633050872ffd4e Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 28 Mar 2020 14:00:22 -0500 Subject: [PATCH 3/9] Removed forced creation of /mods and /config volumes Related to #464 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6436ad12..afe1d8cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ COPY mcstatus /usr/local/bin -VOLUME ["/data","/mods","/config"] +VOLUME ["/data"] COPY server.properties /tmp/server.properties COPY log4j2.xml /tmp/log4j2.xml WORKDIR /data From 8b5430ca44410201597bf76e7cdb0bc0578ecb6f Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 28 Mar 2020 14:01:57 -0500 Subject: [PATCH 4/9] Added textual link to full docs Fixes #448 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 49229f6b..e4892a76 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ latest snapshot. See the *Versions* section below for more information. [![Click for more docs](https://i.imgur.com/jS02ebD.png)](https://github.com/itzg/docker-minecraft-server/blob/master/README.md) +[Full docs available in Github](https://github.com/itzg/docker-minecraft-server/blob/master/README.md) + To simply use the latest stable version, run docker run -d -p 25565:25565 --name mc itzg/minecraft-server From fb92a74084da3ebfcd41a1043566d5c0638e7365 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 28 Mar 2020 14:05:16 -0500 Subject: [PATCH 5/9] Added README section about running on raspberrypi --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e4892a76..20238175 100644 --- a/README.md +++ b/README.md @@ -1090,3 +1090,11 @@ pass that at the end of `docker run` after the image name or set `-e CONSOLE=FAL Some older servers get confused and think that the GUI interface is enabled. You can explicitly disable that by passing `-e GUI=FALSE`. + +## Running on RaspberryPi + +To run this image on a RaspberryPi 3 B+, 4, or newer, use the image tag + + itzg/minecraft-server:armv7 + +> NOTE: you may need to lower the memory allocation, such as `-e MEMORY=750m` \ No newline at end of file From 67d58678a31ad0dc55e5237912c6ced0751e4e4f Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 29 Mar 2020 08:55:53 -0500 Subject: [PATCH 6/9] Added grep in FTB logic to avoid re-adding queryResult flag Fixes #468 --- start-deployFTB | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start-deployFTB b/start-deployFTB index 6c4a2f58..c9745cbb 100644 --- a/start-deployFTB +++ b/start-deployFTB @@ -107,7 +107,8 @@ export FTB_SERVER_START=$(find "${FTB_BASE_DIR}" $entryScriptExpr) export FTB_DIR=$(dirname "${FTB_SERVER_START}") chmod a+x "${FTB_SERVER_START}" -sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}" +grep fml.queryResult=confirm ${FTB_SERVER_START} > /dev/null || \ + sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}" sed -i 's/.*read.*Restart now/#\0/' "${FTB_SERVER_START}" legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar" From 0c34a61332b026f0324c9ed10c1355e28bff6047 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 29 Mar 2020 09:30:46 -0500 Subject: [PATCH 7/9] Upgraded mc-server-runner to 1.3.5 Related to #467 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index afe1d8cc..c1d05f9c 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.3.4 --var app=mc-server-runner --file {{.app}} \ + --var version=1.3.5 --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 736979c20b594923d2a1763584ac308160ae2512 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 29 Mar 2020 09:48:50 -0500 Subject: [PATCH 8/9] Removed description of FTB/CF URL option --- README.md | 48 +++++++++--------------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 20238175..1cdae944 100644 --- a/README.md +++ b/README.md @@ -472,49 +472,19 @@ variable. An FTB/CurseForge server modpack is available together with its respec client modpack on https://www.feed-the-beast.com under "Additional Files." Similar you can locate the modpacks for CurseForge at https://minecraft.curseforge.com/modpacks . -There are a couple of options for obtaining an FTB/CurseForge modpack. -One options is that you can pre-download the **server** modpack and copy the modpack to the `/data` -directory (see "Attaching data directory to host filesystem”). - Now you can add a `-e FTB_SERVER_MOD=name_of_modpack.zip` to your command-line. docker run -d -v /path/on/host:/data -e TYPE=FTB \ -e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.6.zip \ -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server -Instead of pre-downloading a modpack from the FTB/CurseForge site, you -can you set `FTB_SERVER_MOD` (or `CF_SERVER_MOD`) to the **server** URL of a modpack, such as +If you don't want to keep the pre-download modpacks separate from your data directory, +then you can attach another volume at a path of your choosing and reference that. +The following example uses `/modpacks` as the container path as the pre-download area: - docker run ... \ - -e TYPE=FTB \ - -e FTB_SERVER_MOD=https://www.feed-the-beast.com/projects/ftb-infinity-lite-1-10/files/2402889 - -or for a CurseForce modpack: - - docker run ... \ - -e TYPE=CURSEFORGE \ - -e CF_SERVER_MOD=https://minecraft.curseforge.com/projects/enigmatica2expert/files/2663153/download - -### Using the /data volume - -You must use a persistent `/data` mount for this type of server. - -To do this, you will need to attach the container's `/data` directory -(see "Attaching data directory to host filesystem”). - -If the modpack is updated and you want to run the new version on your -server, you stop and remove the container: - - docker stop mc - docker rm mc - -Do not erase anything from your /data directory (unless you know of -specific mods that have been removed from the modpack). Download the -updated FTB server modpack and copy it to `/data`. Start a new container -with `FTB_SERVER_MOD` specifying the updated modpack file. - - $ docker run -d -v /path/on/host:/data -e TYPE=FTB \ - -e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.7.zip \ + docker run -d -v /path/on/host:/data -v /path/to/modpacks:/modpacks \ + -e TYPE=FTB \ + -e FTB_SERVER_MOD=/modpacks/FTBPresentsSkyfactory3Server_3.0.6.zip \ -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server ### Fixing "unable to launch forgemodloader" @@ -529,8 +499,8 @@ then you apply a workaround by adding this to the run invocation: ### Using a client-made curseforge modpack -If you use something like curseforge, you may end up creating/using modpacks that do not -contain server mod jars. Instead, the curseforge setup has `manifest.json` files, which +If you use something like CurseForge, you may end up creating/using modpacks that do not +contain server mod jars. Instead, the CurseForge setup has `manifest.json` files, which will show up under `/data/FeedTheBeast/manifest.json`. To use these packs you will need to: @@ -561,7 +531,7 @@ $ docker run -itd --name derpcraft \ itzg/minecraft-server ``` -Note the `CF_SERVER_MOD` env var should match the url to download the modpack you are targeting. +Note the `CF_SERVER_MOD` env var should match the server version of the modpack you are targeting. ## Running a SpongeVanilla server From 4ad447ba6c736c250b2478a4dbd884abe6d15f3c Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 29 Mar 2020 11:43:26 -0500 Subject: [PATCH 9/9] Used shell when FTB server script missing shebang line For #467 --- start-minecraftFinalSetup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index e9920f11..9d2aa093 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -119,6 +119,10 @@ EOF if [ -f "${FTB_DIR}/settings.cfg" ]; then sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg" fi + # if missing shebang line, then run file through bash + if ! head -1 "${FTB_SERVER_START}"|grep -q "^#!"; then + mcServerRunnerArgs="${mcServerRunnerArgs} --shell bash" + fi cd "${FTB_DIR}" log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."