From f856276d71f2f0c2e6812918032a6e7172ee440c Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 1 Feb 2021 17:29:09 -0600 Subject: [PATCH 01/21] Upgraded multiarch to Java 11 --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 31d84a6d..13f1782a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,10 @@ -FROM ubuntu:18.04 +FROM adoptopenjdk:11-jre LABEL org.opencontainers.image.authors="Geoff Bourne " RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive \ apt-get install -y \ - openjdk-8-jre-headless \ imagemagick \ gosu \ sudo \ From f397dd71a9e6891eb39194a42cffff28baa737f6 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 11 Feb 2021 14:52:51 -0600 Subject: [PATCH 02/21] Fix PATH to include java when needed --- start-minecraftFinalSetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index b9a35ba9..3a2d1df1 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -170,7 +170,7 @@ function copyFilesForCurseForge() { if ! which java > /dev/null; then log "Fixing PATH to include java" - PATH="${PATH}:/usr/bin" + PATH="${PATH}:/opt/java/openjdk/bin" fi mcServerRunnerArgs="--stop-duration ${STOP_DURATION:-60}s" From 89afba7437f94f7d43d664e91a51d8690a65beaf Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 27 Feb 2021 16:58:25 -0600 Subject: [PATCH 03/21] Ensure FTBA version.json is readable #784 --- start-deployFTBA | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start-deployFTBA b/start-deployFTBA index 19800f9a..38fae975 100644 --- a/start-deployFTBA +++ b/start-deployFTBA @@ -43,6 +43,9 @@ if ! [ -f "${ftbInstallMarker}" ] || [ $(cat "${ftbInstallMarker}") != "${FTB_MO echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker} writeEula + + # some modpacks result in --w----r-- permissions + chmod a+r version.json else log "FTB modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID} is ready to go" fi From 44769b6001ef54bad89ace246d73efce6e88867e Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 6 Mar 2021 16:06:43 -0600 Subject: [PATCH 04/21] Shifted PATH-fix earlier in startup --- start-configuration | 5 +++++ start-minecraftFinalSetup | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/start-configuration b/start-configuration index 12a2ef93..6b2be3eb 100644 --- a/start-configuration +++ b/start-configuration @@ -54,6 +54,11 @@ if [[ $RCON_PASSWORD_FILE ]]; then log "" fi +if ! which java > /dev/null; then + log "Fixing PATH to include java" + PATH="${PATH}:/opt/java/openjdk/bin" +fi + export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json case "X$VERSION" in diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index d630d3a9..3d0f7c75 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -167,11 +167,6 @@ function copyFilesForCurseForge() { cp -f /data/eula.txt "${FTB_DIR}/" } -if ! which java > /dev/null; then - log "Fixing PATH to include java" - PATH="${PATH}:/opt/java/openjdk/bin" -fi - mcServerRunnerArgs="--stop-duration ${STOP_DURATION:-60}s" if [[ ${TYPE} == "CURSE_INSTANCE" ]]; then if isTrue ${DEBUG_EXEC}; then From e5948081a7b9f29f4b352aecc0258ca77b86bd90 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 1 Apr 2021 16:27:50 -0500 Subject: [PATCH 05/21] Added git #819 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d9e0cf5e..d519a9c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update \ sudo \ net-tools \ curl wget \ + git \ jq \ dos2unix \ mysql-client \ From 34ae93f3795dbea60e61e3c112fb250357023a4e Mon Sep 17 00:00:00 2001 From: itzg Date: Wed, 12 May 2021 16:29:05 +0000 Subject: [PATCH 06/21] Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4919a9a8..0d29f6c3 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ With that you can easily view the logs, stop, or re-start the container: * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From 589a9aa3dbd936edc0c81e9f6117c9c035d2e4ac Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 12 May 2021 20:41:28 -0500 Subject: [PATCH 07/21] Added support for directories in MODS #871 --- README.md | 8 +++++--- start-finalSetupModpack | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0d29f6c3..9e273033 100644 --- a/README.md +++ b/README.md @@ -1136,10 +1136,12 @@ To use this option pass the environment variable `MODPACK`, such as top level of the zip archive. Make sure the jars are compatible with the particular `TYPE` of server you are running. -You may also download individual mods using the `MODS` environment variable and supplying the URL or path -to the jar files. Multiple mods/plugins should be comma separated. +You may also download or copy over individual mods using the `MODS` environment variable. `MODS` contains a comma-separated list of +- URL of a jar file +- container path to a jar file +- container path to a directory containing jar files - docker run -d -e MODS=https://www.example.com/mods/mod1.jar,https://www.example.com/mods/mod2.jar ... + docker run -d -e MODS=https://www.example.com/mods/mod1.jar,/plugins/common,/plugins/special/mod2.jar ... ### Remove old mods/plugins diff --git a/start-finalSetupModpack b/start-finalSetupModpack index c854ebb7..4e956070 100644 --- a/start-finalSetupModpack +++ b/start-finalSetupModpack @@ -91,15 +91,18 @@ if [[ "$MODS" ]]; then exit 2 fi fi - elif [[ "$i" =~ .*\.jar ]]; then + elif [[ -f "$i" && "$i" =~ .*\.jar ]]; then log "Copying plugin located at $i ..." out_file=$(basename "$i") if ! cp "$i" "${out_dir}/$out_file"; then log "ERROR: failed to copy from $i into $out_dir" exit 2 fi + elif [[ -d "$i" ]]; then + log "Copying plugin jars from $i ..." + cp "$i"/*.jar "${out_dir}" else - log "ERROR Invalid URL or Path given in MODS: $i" + log "ERROR Invalid URL or path given in MODS: $i" exit 2 fi done From 6fe5bb4aa8382814c2e24c1272e6396cf5098271 Mon Sep 17 00:00:00 2001 From: itzg Date: Thu, 13 May 2021 01:41:49 +0000 Subject: [PATCH 08/21] Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e273033..63165ac1 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ With that you can easily view the logs, stop, or re-start the container: * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From c7546ef08a4714a8c853541d443f3a6614528f2e Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 12 May 2021 20:58:52 -0500 Subject: [PATCH 09/21] docs: Clarified the default type and version of Minecraft server #863 --- README.md | 169 ++++++++++++++++++++++-------------------------------- 1 file changed, 68 insertions(+), 101 deletions(-) diff --git a/README.md b/README.md index 63165ac1..40d79d5e 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ With that you can easily view the logs, stop, or re-start the container: > Be sure to always include `-e EULA=TRUE` in your commands, as Mojang/Microsoft requires EULA acceptance. +By default, the container will download the latest version of the "vanilla" [Minecraft: Java Edition server](https://www.minecraft.net/en-us/download/server) provided by Mojang. The [`VERSION`](#versions) and the [`TYPE`](#server-types) can be configured to create many variations of desired Minecraft server. + **TABLE OF CONTENTS** @@ -333,13 +335,15 @@ The [examples directory](https://github.com/itzg/docker-minecraft-server/tree/ma If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Minecraft Server Deployment (CloudFormation) repository](https://github.com/vatertime/minecraft-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use. -## Running a Forge Server +## Server types + +### Running a Forge Server Enable [Forge server](http://www.minecraftforge.net/wiki/) mode by adding a `-e TYPE=FORGE` to your command-line. The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=14.23.5.2854`. - $ docker run -d -v /path/on/host:/data \ + docker run -d -v /path/on/host:/data \ -e TYPE=FORGE \ -e VERSION=1.12.2 -e FORGEVERSION=14.23.5.2854 \ -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server @@ -347,36 +351,18 @@ The overall version is specified by `VERSION`, [as described in the section abov To use a pre-downloaded Forge installer, place it in the attached `/data` directory and specify the name of the installer file with `FORGE_INSTALLER`, such as: - $ docker run -d -v /path/on/host:/data ... \ + docker run -d -v /path/on/host:/data ... \ -e FORGE_INSTALLER=forge-1.11.2-13.20.0.2228-installer.jar ... To download a Forge installer from a custom location, such as your own file repository, specify the URL with `FORGE_INSTALLER_URL`, such as: - $ docker run -d -v /path/on/host:/data ... \ + docker run -d -v /path/on/host:/data ... \ -e FORGE_INSTALLER_URL=http://HOST/forge-1.11.2-13.20.0.2228-installer.jar ... In both of the cases above, there is no need for the `VERSION` or `FORGEVERSION` variables. -### Managing mods - -In order to manage mods, you have two options: - -1. [Attach a host directory to the /data path](#attaching-data-directory-to-host-filesystem) and manage the contents of the `mods` subdirectory - -2. Using a mods-mount - -If the container paths `/mods` and/or `/config` exist, such as by attaching a docker volume or host path, then any files in either of these directories will be copied over to the respective `/data` subdirectory before starting Minecraft. - -If you want old mods to be removed as the `/mods` content is updated, then add `-e REMOVE_OLD_MODS=TRUE`. You can fine tune the removal process by specifying the `REMOVE_OLD_MODS_INCLUDE` and `REMOVE_OLD_MODS_EXCLUDE` variables. By default, everything will be removed. You can also specify the `REMOVE_OLD_MODS_DEPTH` (default is 16) variable to only delete files up to a certain level. - -For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory. - -You can specify the destination of the files that are copied from `/mods` and `/config` by setting the `COPY_MODS_DEST` and `COPY_CONFIG_DEST`, where the default is `/data/mods` and `/data/config`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. - -> NOTE: If a file was updated in the destination path and is newer than the source file from `/config`, then it will not be overwritten. - -## Running a Bukkit/Spigot server +### Running a Bukkit/Spigot server Enable Bukkit/Spigot server mode by adding a `-e TYPE=BUKKIT` or `-e TYPE=SPIGOT` to your command-line. @@ -397,7 +383,7 @@ Plugins can either be managed within the `plugins` subdirectory of the [data dir > NOTE some of the `VERSION` values are not as intuitive as you would think, so make sure to click into the version entry to find the **exact** version needed for the download. For example, "1.8" is not sufficient since their download naming expects `1.8-R0.1-SNAPSHOT-latest` exactly. -## Running a Paper server +### Running a Paper server Enable Paper server mode by adding a `-e TYPE=PAPER` to your command-line. @@ -419,7 +405,7 @@ If you have attached a host directory to the `/data` volume, then you can instal [You can also auto-download plugins using `SPIGET_RESOURCES`.](#auto-downloading-spigotmcbukkitpapermc-plugins) -## Running a Tuinity server +### Running a Tuinity server A [Tuinity](https://github.com/Spottedleaf/Tuinity) server, which is a fork of Paper aimed at improving server performance at high playercounts. @@ -427,7 +413,7 @@ A [Tuinity](https://github.com/Spottedleaf/Tuinity) server, which is a fork of P > **NOTE** only `VERSION=LATEST` is supported -## Running an Airplane server +### Running an Airplane server An [Airplane](https://github.com/TECHNOVE/Airplane) server, which is a fork of Tuinity aimed at further improving server performance at high playercounts. @@ -441,7 +427,7 @@ Extra variables: - `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded - `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler -## Running a Purpur server +### Running a Purpur server A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper, Tuinity, Airplane with the goal of providing new and interesting configuration options". @@ -454,7 +440,7 @@ Extra variables: - `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded - `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler -## Running a Yatopia server +### Running a Yatopia server A [Yatopia](https://github.com/YatopiaMC/Yatopia) server, which is a "blazing fast Tuinity fork with best in class performance". @@ -467,7 +453,7 @@ Extra variables: - `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded - `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler -## Running a Magma server +### Running a Magma server A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with @@ -476,7 +462,7 @@ A [Magma](https://magmafoundation.org/) server, which is a combination of Forge > **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2" -## Running a Mohist server +### Running a Mohist server A [Mohist](https://github.com/Mohist-Community/Mohist) server can be used with @@ -488,7 +474,7 @@ By default the latest build will be used; however, a specific build number can b -e VERSION=1.16.5 -e MOHIST_BUILD=374 -## Running a Catserver type server +### Running a Catserver type server A [Catserver](http://catserver.moe/) type server can be used with @@ -496,6 +482,49 @@ A [Catserver](http://catserver.moe/) type server can be used with > **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored +### Running a SpongeVanilla server + +Enable SpongeVanilla server mode by adding a `-e TYPE=SPONGEVANILLA` to your command-line. +By default the container will run the latest `STABLE` version. +If you want to run a specific version, you can add `-e SPONGEVERSION=1.11.2-6.1.0-BETA-19` to your command-line. + + docker run -d -v /path/on/host:/data -e TYPE=SPONGEVANILLA \ + -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server + +You can also choose to use the `EXPERIMENTAL` branch. +Just change it with `SPONGEBRANCH`, such as: + + $ docker run -d -v /path/on/host:/data ... \ + -e TYPE=SPONGEVANILLA -e SPONGEBRANCH=EXPERIMENTAL ... + +### Running a Fabric Server + +Enable [Fabric server](http://fabricmc.net/use/) mode by adding a `-e TYPE=FABRIC` to your command-line. By default, the container will run the latest version, but you can also choose to run a specific version with `VERSION`. + +``` +docker run -d -v /path/on/host:/data \ + -e TYPE=FABRIC \ + -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server +``` + +A specific installer version can be requested using `FABRIC_INSTALLER_VERSION`. + +To use a pre-downloaded Fabric installer, place it in a directory attached into the container, such as the `/data` volume and specify the name of the installer file with `FABRIC_INSTALLER`, such as: + +``` +docker run -d -v /path/on/host:/data ... \ + -e FABRIC_INSTALLER=fabric-installer-0.5.0.32.jar ... +``` + +To download a Fabric installer from a custom location, such as your own file repository, specify the URL with `FABRIC_INSTALLER_URL`, such as: + +``` +docker run -d -v /path/on/host:/data ... \ + -e FABRIC_INSTALLER_URL=http://HOST/fabric-installer-0.5.0.32.jar ... +``` + +In order to add mods, you have two options: + ## Running a server with a Feed the Beast modpack > **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version). @@ -567,76 +596,6 @@ then you apply a workaround by adding this to the run invocation: -e FTB_LEGACYJAVAFIXER=true -## Running a SpongeVanilla server - -Enable SpongeVanilla server mode by adding a `-e TYPE=SPONGEVANILLA` to your command-line. -By default the container will run the latest `STABLE` version. -If you want to run a specific version, you can add `-e SPONGEVERSION=1.11.2-6.1.0-BETA-19` to your command-line. - - docker run -d -v /path/on/host:/data -e TYPE=SPONGEVANILLA \ - -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server - -You can also choose to use the `EXPERIMENTAL` branch. -Just change it with `SPONGEBRANCH`, such as: - - $ docker run -d -v /path/on/host:/data ... \ - -e TYPE=SPONGEVANILLA -e SPONGEBRANCH=EXPERIMENTAL ... - -## Running a Fabric Server - -Enable [Fabric server](http://fabricmc.net/use/) mode by adding a `-e TYPE=FABRIC` to your command-line. By default, the container will run the latest version, but you can also choose to run a specific version with `VERSION`. - -``` -docker run -d -v /path/on/host:/data \ - -e TYPE=FABRIC \ - -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server -``` - -A specific installer version can be requested using `FABRIC_INSTALLER_VERSION`. - -To use a pre-downloaded Fabric installer, place it in a directory attached into the container, such as the `/data` volume and specify the name of the installer file with `FABRIC_INSTALLER`, such as: - -``` -docker run -d -v /path/on/host:/data ... \ - -e FABRIC_INSTALLER=fabric-installer-0.5.0.32.jar ... -``` - -To download a Fabric installer from a custom location, such as your own file repository, specify the URL with `FABRIC_INSTALLER_URL`, such as: - -``` -docker run -d -v /path/on/host:/data ... \ - -e FABRIC_INSTALLER_URL=http://HOST/fabric-installer-0.5.0.32.jar ... -``` - -In order to add mods, you have two options: - -### Using the /data volume - -This is the easiest way if you are using a persistent `/data` mount. - -To do this, you will need to attach the container's `/data` directory -(see "Attaching data directory to host filesystem”). -Then, you can add mods to the `/path/on/host/mods` folder you chose. From the example above, -the `/path/on/host` folder contents look like: - -``` -/path/on/host -├── mods -│ └── ... INSTALL MODS HERE ... -├── config -│ └── ... CONFIGURE MODS HERE ... -├── ops.json -├── server.properties -├── whitelist.json -└── ... -``` - -If you add mods while the container is running, you'll need to restart it to pick those -up: - - docker stop mc - docker start mc - ## Optional plugins, mods, and config attach points There are optional volume paths that can be attached to supply content to be copied into the data area: @@ -650,8 +609,16 @@ There are optional volume paths that can be attached to supply content to be cop `/config` : contents are copied into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST` +If you want old mods/plugins to be removed before the content is brought over from those attach points, then add `-e REMOVE_OLD_MODS=TRUE`. You can fine tune the removal process by specifying the `REMOVE_OLD_MODS_INCLUDE` and `REMOVE_OLD_MODS_EXCLUDE` variables. By default, everything will be removed. You can also specify the `REMOVE_OLD_MODS_DEPTH` (default is 16) variable to only delete files up to a certain level. + +For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory. + +You can specify the destination of the files that are copied from `/mods` and `/config` by setting the `COPY_MODS_DEST` and `COPY_CONFIG_DEST`, where the default is `/data/mods` and `/data/config`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. + These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive. +> For more flexibility with mods/plugins preparation, you can declare directories to use in [the `MODS` variable](#downloadable-modplugin-pack-for-forge-bukkit-and-spigot-servers) + ## Auto-downloading SpigotMC/Bukkit/PaperMC plugins The `SPIGET_RESOURCES` variable can be set with a comma-separated list of SpigotMC resource IDs to automatically download [SpigotMC resources/plugins](https://www.spigotmc.org/resources/) using [the spiget API](https://spiget.org/). Resources that are zip files will be expanded into the plugins directory and resources that are simply jar files will be moved there. From 44dbe8009631e3340a3db36f2a94d7ea64615144 Mon Sep 17 00:00:00 2001 From: itzg Date: Thu, 13 May 2021 01:59:18 +0000 Subject: [PATCH 10/21] Auto update markdown TOC --- README.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 40d79d5e..805da3b7 100644 --- a/README.md +++ b/README.md @@ -56,17 +56,19 @@ By default, the container will download the latest version of the "vanilla" [Min * [Helm Charts](#helm-charts) * [Examples](#examples) * [Amazon Web Services (AWS) Deployment](#amazon-web-services-aws-deployment) - * [Running a Forge Server](#running-a-forge-server) - * [Managing mods](#managing-mods) - * [Running a Bukkit/Spigot server](#running-a-bukkitspigot-server) - * [Running a Paper server](#running-a-paper-server) - * [Running a Tuinity server](#running-a-tuinity-server) - * [Running an Airplane server](#running-an-airplane-server) - * [Running a Purpur server](#running-a-purpur-server) - * [Running a Yatopia server](#running-a-yatopia-server) - * [Running a Magma server](#running-a-magma-server) - * [Running a Mohist server](#running-a-mohist-server) - * [Running a Catserver type server](#running-a-catserver-type-server) + * [Server types](#server-types) + * [Running a Forge Server](#running-a-forge-server) + * [Running a Bukkit/Spigot server](#running-a-bukkitspigot-server) + * [Running a Paper server](#running-a-paper-server) + * [Running a Tuinity server](#running-a-tuinity-server) + * [Running an Airplane server](#running-an-airplane-server) + * [Running a Purpur server](#running-a-purpur-server) + * [Running a Yatopia server](#running-a-yatopia-server) + * [Running a Magma server](#running-a-magma-server) + * [Running a Mohist server](#running-a-mohist-server) + * [Running a Catserver type server](#running-a-catserver-type-server) + * [Running a SpongeVanilla server](#running-a-spongevanilla-server) + * [Running a Fabric Server](#running-a-fabric-server) * [Running a server with a Feed the Beast modpack](#running-a-server-with-a-feed-the-beast-modpack) * [Environment Variables:](#environment-variables) * [Upgrading](#upgrading) @@ -75,9 +77,6 @@ By default, the container will download the latest version of the "vanilla" [Min * [Modpack data directory](#modpack-data-directory) * [Buggy start scripts](#buggy-start-scripts) * [Fixing "unable to launch forgemodloader"](#fixing-unable-to-launch-forgemodloader) - * [Running a SpongeVanilla server](#running-a-spongevanilla-server) - * [Running a Fabric Server](#running-a-fabric-server) - * [Using the /data volume](#using-the-data-volume) * [Optional plugins, mods, and config attach points](#optional-plugins-mods-and-config-attach-points) * [Auto-downloading SpigotMC/Bukkit/PaperMC plugins](#auto-downloading-spigotmcbukkitpapermc-plugins) * [Replacing variables inside configs](#replacing-variables-inside-configs) @@ -143,7 +142,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From d80f40075ccd98d99ffa7b15ff14715890518c73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 02:10:17 +0000 Subject: [PATCH 11/21] build(deps): bump docker/setup-qemu-action from 1 to 1.1.0 (#867) --- .github/workflows/build-multiarch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 7f536787..d376681b 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -54,7 +54,7 @@ jobs: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}- - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v1.1.0 - name: Login to DockerHub uses: docker/login-action@v1 From f141806fb4d879b4833ba1a1f5f4f7544944e080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 01:39:04 +0000 Subject: [PATCH 12/21] build(deps): bump stefanzweifel/git-auto-commit-action from 4 to 4.11.0 (#868) --- .github/workflows/generate-toc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 976746fc..75e81c46 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -15,6 +15,6 @@ jobs: curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc chmod a+x gh-md-toc ./gh-md-toc --insert --no-backup README.md - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v4.11.0 with: commit_message: Auto update markdown TOC \ No newline at end of file From 0a35f661bdf626c5e3ab4c710d3ee15d1798f62a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 01:45:43 +0000 Subject: [PATCH 13/21] build(deps): bump actions/checkout from 2.2.0 to 2.3.4 (#869) --- .github/workflows/build-multiarch.yml | 2 +- .github/workflows/generate-toc.yml | 2 +- .github/workflows/main.yml | 4 ++-- .github/workflows/pr.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index d376681b..1a0e2284 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2.2.0 + uses: actions/checkout@v2.3.4 - name: Prepare id: prep diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 75e81c46..4a31c0b1 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - run: | curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc chmod a+x gh-md-toc diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 867138b5..0f97891f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - name: Run tests run: | @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - name: Prepare id: prep diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 16096da7..8820d4f4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - name: Run tests run: | From 75967cec02b5e9d1f6e1d770a7b14793f3f6b9bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 01:47:19 +0000 Subject: [PATCH 14/21] build(deps): bump actions/cache from 2 to 2.1.5 (#870) --- .github/workflows/build-multiarch.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 1a0e2284..7d150fc3 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -46,7 +46,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f97891f..ce2678f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }} From ba88bf72ce5ba95c20d551af3e861040b40dfe3a Mon Sep 17 00:00:00 2001 From: W4ff1e <72278085+W4ff1e@users.noreply.github.com> Date: Thu, 13 May 2021 23:51:47 -0400 Subject: [PATCH 15/21] Updated examples to version 3.8 (#872) --- README.md | 10 ++++++---- examples/docker-compose-big.yml | 2 +- examples/docker-compose-curseforge.yml | 2 +- examples/docker-compose-forge.yml | 2 +- examples/docker-compose-ftba.yml | 2 +- examples/docker-compose-paper.yml | 2 +- examples/docker-compose-proxied.yml | 2 +- examples/docker-compose-simple.yml | 2 +- examples/docker-compose-spongeforge.yml | 2 +- examples/docker-compose-world-download.yml | 2 +- 10 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 805da3b7..7df133dc 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + @@ -209,7 +209,7 @@ When attached in this way you can stop the server, edit the configuration under With Docker Compose, setting up a host attached directory is even easier since relative paths can be configured. For example, with the following `docker-compose.yml` Docker will automatically create/attach the relative directory `minecraft-data` to the container. ```yaml -version: "3" +version: "3.8" services: mc: @@ -688,7 +688,7 @@ database: This is how your `docker-compose.yml` file could look like: ```yml -version: "3" +version: "3.8" # Other docker-compose examples in /examples services: @@ -763,7 +763,9 @@ every time you want to create new Minecraft server, you can now use [Docker Compose](https://docs.docker.com/compose/). Start with a `docker-compose.yml` file like the following: -``` +```yml +version: "3.8" + minecraft-server: image: itzg/minecraft-server diff --git a/examples/docker-compose-big.yml b/examples/docker-compose-big.yml index e5d2bf28..ddf26a8b 100644 --- a/examples/docker-compose-big.yml +++ b/examples/docker-compose-big.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.8' services: minecraft: diff --git a/examples/docker-compose-curseforge.yml b/examples/docker-compose-curseforge.yml index 50c748c4..a3b885d5 100644 --- a/examples/docker-compose-curseforge.yml +++ b/examples/docker-compose-curseforge.yml @@ -1,4 +1,4 @@ -version: '3.2' +version: '3.8' services: mc: diff --git a/examples/docker-compose-forge.yml b/examples/docker-compose-forge.yml index 2e2a5d59..9a4d7688 100644 --- a/examples/docker-compose-forge.yml +++ b/examples/docker-compose-forge.yml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: mc: diff --git a/examples/docker-compose-ftba.yml b/examples/docker-compose-ftba.yml index 81019b59..4976296d 100644 --- a/examples/docker-compose-ftba.yml +++ b/examples/docker-compose-ftba.yml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: mc: diff --git a/examples/docker-compose-paper.yml b/examples/docker-compose-paper.yml index d01c3e10..2c62dd4e 100644 --- a/examples/docker-compose-paper.yml +++ b/examples/docker-compose-paper.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: mc: diff --git a/examples/docker-compose-proxied.yml b/examples/docker-compose-proxied.yml index e116f240..f808022c 100644 --- a/examples/docker-compose-proxied.yml +++ b/examples/docker-compose-proxied.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.8' services: mc: diff --git a/examples/docker-compose-simple.yml b/examples/docker-compose-simple.yml index f9b0ba40..ed9c54dd 100644 --- a/examples/docker-compose-simple.yml +++ b/examples/docker-compose-simple.yml @@ -1,4 +1,4 @@ -version: "3" +version: "3.8" services: mc: diff --git a/examples/docker-compose-spongeforge.yml b/examples/docker-compose-spongeforge.yml index e8b6ae39..ec9c98ea 100644 --- a/examples/docker-compose-spongeforge.yml +++ b/examples/docker-compose-spongeforge.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.8' # Forge with Sponge API support. THIS REQUIRES DOWNLOADING SPONGEFORGE. # Place the SpongeForge jar file in /data/mods. Other Forge mods go here as well. # Place Sponge mods in /data/mods/plugins. Yes, this is a directory inside the Forge mod directory. Do NOT use /data/plugins. diff --git a/examples/docker-compose-world-download.yml b/examples/docker-compose-world-download.yml index 5b334f67..0e3d408a 100644 --- a/examples/docker-compose-world-download.yml +++ b/examples/docker-compose-world-download.yml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: mc: From 4606c27cdc16555c7c2b04c98a51e313df165ead Mon Sep 17 00:00:00 2001 From: itzg Date: Fri, 14 May 2021 03:52:02 +0000 Subject: [PATCH 16/21] Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7df133dc..34d3fa9b 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From e95ae2dbbb6e279efaa428ddfc8345cfe78dbb7c Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 14 May 2021 14:06:08 +0100 Subject: [PATCH 17/21] fix helm chart links (#873) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 34d3fa9b..e7f91415 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,9 @@ Some orchestration systems, such as Portainer, don't allow for disabling the def ### Helm Charts -- [stable/minecraft](https://hub.helm.sh/charts/stable/minecraft) ([chart source](https://github.com/helm/charts/tree/master/stable/minecraft)) +- itzg Helm Chart: + - [GitHub repo](https://github.com/itzg/minecraft-server-charts) + - [Helm Chart repo](https://itzg.github.io/minecraft-server-charts/) - [mcsh/server-deployment](https://github.com/mcserverhosting-net/charts) ### Examples From de707049d4105ac78607ccbb918164e6d12d05a1 Mon Sep 17 00:00:00 2001 From: itzg Date: Fri, 14 May 2021 13:06:27 +0000 Subject: [PATCH 18/21] Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7f91415..a5424552 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From 1b13ddcf3273d6c0da73df80838ebd1cf650b256 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 14 May 2021 17:17:07 -0500 Subject: [PATCH 19/21] Added start-server.sh as detected CurseForge entry script --- start-deployCF | 1 + 1 file changed, 1 insertion(+) diff --git a/start-deployCF b/start-deployCF index f1b66a32..3508bc00 100644 --- a/start-deployCF +++ b/start-deployCF @@ -109,6 +109,7 @@ entryScriptExpr=" -o -name ServerStartLinux.sh -o -name LaunchServer.sh -o -name server-start.sh + -o -name start-server.sh -o -name startserver.sh -o -name StartServer.sh " From e5bee8e79bfae16a24797fa363b5fe97f6a933cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 17:18:58 -0500 Subject: [PATCH 20/21] build(deps): bump docker/build-push-action from 2 to 2.4.0 (#866) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 2.4.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2...v2.4.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-multiarch.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 7d150fc3..d810a02a 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -64,7 +64,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v2.4.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce2678f1..6d74d3e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v2.4.0 with: context: . file: ./Dockerfile From 671e84bec94e0878ef125df557ea8705894af821 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 14 May 2021 17:48:17 -0500 Subject: [PATCH 21/21] ci: use docker/metadata-action --- .github/workflows/build-multiarch.yml | 41 +++++++++------------------ 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index d810a02a..ba139c7b 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -22,25 +22,15 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 - - name: Prepare - id: prep - run: | - DOCKER_IMAGE=itzg/minecraft-server - VERSION=edge - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/} - fi - if [[ $GITHUB_REF == refs/heads/* ]]; then - VERSION=${GITHUB_REF#refs/heads/} - if [[ $VERSION == master ]]; then - VERSION=latest - fi - fi - TAGS="${DOCKER_IMAGE}:${VERSION//\//-}" - echo ::set-output name=tags::${TAGS} - echo ::set-output name=cache_from::${TAGS} - echo ::set-output name=version::${VERSION//\//-} - echo ::set-output name=cache_version::${VERSION//\//-} + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: | + itzg/minecraft-server + tags: | + type=ref,event=branch + type=ref,event=tag - name: Setup Docker Buildx uses: docker/setup-buildx-action@v1 @@ -49,9 +39,9 @@ jobs: uses: actions/cache@v2.1.5 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-${{ steps.meta.outputs.version }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}- + ${{ runner.os }}-buildx-${{ steps.meta.outputs.version }}- - name: Set up QEMU uses: docker/setup-qemu-action@v1.1.0 @@ -67,19 +57,14 @@ jobs: uses: docker/build-push-action@v2.4.0 with: context: . - file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} # ensure latest base image is used pull: true cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache - labels: | - org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server - org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server - org.opencontainers.image.version=${{ steps.prep.outputs.version }} - org.opencontainers.image.revision=${{ github.sha }} + labels: ${{ steps.meta.outputs.labels }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }}