Compare commits

..
14 changed files with 36 additions and 106 deletions
+1 -10
View File
@@ -1,16 +1,7 @@
version: 2 version: 2
updates: updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
schedule: schedule:
interval: "weekly" interval: "weekly"
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: weekly
groups:
patches:
patterns:
- "*"
update-types:
- patch
+1 -1
View File
@@ -42,7 +42,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=1.9.0 --var app=mc-server-runner --file {{.app}} \ --var version=1.9.0 --var app=mc-server-runner --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.34.7 ARG MC_HELPER_VERSION=1.34.5
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper # used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1 ARG MC_HELPER_REV=1
+1 -1
View File
@@ -873,7 +873,7 @@ For example, the following will auto-download the [EssentialsX](https://www.spig
``` ```
-e MODRINTH_PROJECTS=fabric-api,fabric-api:PbVeub96,fabric-api:beta -e MODRINTH_PROJECTS=fabric-api,fabric-api:PbVeub96,fabric-api:beta
``` ```
- **MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES**=true : required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true` - **MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES**=false : required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true`
- **MODRINTH_ALLOWED_VERSION_TYPE**=release : the version type is used to determine the newest version to use from each project. The allowed values are `release`, `beta`, `alpha`. - **MODRINTH_ALLOWED_VERSION_TYPE**=release : the version type is used to determine the newest version to use from each project. The allowed values are `release`, `beta`, `alpha`.
### Downloadable mod/plugin pack for Forge, Fabric, and Bukkit-like Servers ### Downloadable mod/plugin pack for Forge, Fabric, and Bukkit-like Servers
+7 -27
View File
@@ -64,19 +64,9 @@ To whitelist players for your Minecraft server, you can:
When either is set, [whitelisting of connecting users](https://minecraft.fandom.com/wiki/Server.properties#white-list) is enabled. When either is set, [whitelisting of connecting users](https://minecraft.fandom.com/wiki/Server.properties#white-list) is enabled.
To change the behavior when the whitelist file already exists, set the variable `EXISTING_WHITELIST_FILE` to one of the following options: Use of `WHITELIST_FILE` will **overwrite** an existing `whitelist.json` file; however, the option can be combined with `WHITELIST` to refine the list.
`SKIP` (default) By default, `WHITELIST` will keep the `whitelist.json` fully synchronized with the given list. All whitelist entries can be removed by setting `WHITELIST` to an empty string. To only append new users, set `APPEND_WHITELIST` to "true".
: Skip processing of the whitelist file when one is already present. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "false".
`SYNCHRONIZE`
: Synchronize the list of users in the file with the `WHITELIST` or `WHITELIST_FILE` provided. When using both, `WHITELIST` will take precedence. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "true".
`MERGE`
: Merge the list of users from `WHITELIST` into the existing file. `WHITELIST_FILE` cannot be used with this option.
`SYNC_FILE_MERGE_LIST`
: When `WHITELIST_FILE` is provided it will overwrite an existing whitelist file. Also, if `WHITELIST` is provided, then those users will be merged into the newly copied file.
!!! note !!! note
@@ -86,10 +76,10 @@ To [enforce the whitelist changes immediately](https://minecraft.fandom.com/wiki
### Op/Administrator Players ### Op/Administrator Players
Similar to the whitelist, users can be provisioned as operators (aka administrators) to your Minecraft server by Similar to the whitelist, to add users as operators (aka administrators) to your Minecraft server, you can:
- Providing a list of usernames and/or UUIDs separated by commas or newlines via the `OPS` environment variable - Provide a list of usernames and/or UUIDs separated by commas or newlines via the `OPS` environment variable
- Providing the URL or container path to an ops file via `OPS_FILE` that will be retrieved/copied into the standard location - Provide the URL or container path to an ops file via `OPS_FILE` that will be retrieved/copied into the standard location
!!! example !!! example
@@ -102,19 +92,9 @@ Similar to the whitelist, users can be provisioned as operators (aka administrat
user3 user3
``` ```
To change the behavior when the ops file already exists, set the variable `EXISTING_OPS_FILE` to one of the following options: Use of `OPS_FILE` will **overwrite** an existing `ops.json` file; however, the option can be combined with `OPS` to refine the list.
`SKIP` (default) By default, `OPS` will keep the `ops.json` fully synchronized with the given list. All ops entries can be removed by setting `OPS` to an empty string. To only append new users, set `APPEND_OPS` to "true". New entries will be assigned [level 4](https://glimpse.me/blog/how-to-op-yourself-in-minecraft/) and not bypass player limit. Manual changes to those fields will be retained.
: Skip processing of the ops file when one is already present. This is the same as setting the legacy variable `OVERRIDE_OPS` to "false".
`SYNCHRONIZE`
: Synchronize the list of users in the file with the `OPS` or `OPS_FILE` provided. When using both, `OPS` will take precedence. The `level` and `bypassesPlayerLimit` will be retained from previous entries. This is the same as setting the legacy variable `OVERRIDE_OPS` to "true".
`MERGE`
: Merge the list of users from `OPS` into the existing file. `OPS_FILE` cannot be used with this option.
`SYNC_FILE_MERGE_LIST`
: When `OPS_FILE` is provided it will overwrite an existing ops file. Also, if `OPS` is provided, then those users will be merged into the newly copied file.
!!! note !!! note
-5
View File
@@ -25,8 +25,3 @@ healthcheck:
``` ```
Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`. Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`.
### Healthchecks for older versions
This container disables Healthchecks for Versions before b1.8 as those versions do not support any kind of server pinging.
For more information see [Server List Ping](https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3)
+4 -2
View File
@@ -47,14 +47,16 @@ These paths work well if you want to have a common set of modules in a separate
## Zip file modpack ## Zip file modpack
Like the `WORLD` option above, you can specify the URL or container path of a "mod pack" to download and install into `mods` for Forge/Fabric or `plugins` for Bukkit/Spigot. To use this option pass the environment variable `MODPACK`, such as Like the `WORLD` option above, you can specify the URL or path of a "mod pack"
to download and install into `mods` for Forge/Fabric or `plugins` for Bukkit/Spigot.
To use this option pass the environment variable `MODPACK`, such as
```shell ```shell
docker run -d -e MODPACK=http://www.example.com/mods/modpack.zip ... docker run -d -e MODPACK=http://www.example.com/mods/modpack.zip ...
``` ```
!!! note !!! note
The referenced URL/file must be a zip file with one or more jar files at the The referenced URL must be a zip file with one or more jar files at the
top level of the zip archive. Make sure the jars are compatible with the top level of the zip archive. Make sure the jars are compatible with the
particular `TYPE` of server you are running. particular `TYPE` of server you are running.
+1 -1
View File
@@ -23,7 +23,7 @@
## Extra options ## Extra options
`MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES` `MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES`
: Required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true`. The default is "true" : Required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true`. The default is "false".
`MODRINTH_ALLOWED_VERSION_TYPE` `MODRINTH_ALLOWED_VERSION_TYPE`
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. : The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`.
+9 -9
View File
@@ -1,9 +1,9 @@
mkdocs == 1.5.2 mkdocs
mkdocs-material-extensions == 1.1.1 mkdocs-material-extensions
mkdocs-material == 9.2.7 mkdocs-material
mkdocs-autorefs == 0.5.0 mkdocs-autorefs
mkdocstrings == 0.23.0 mkdocstrings
mkdocs-literate-nav == 0.6.0 mkdocs-literate-nav
mdx-gh-links == 0.3.1 mdx-gh-links
mkdocs-click == 0.8.0 mkdocs-click
mkdocs-static-i18n == 1.0.2 mkdocs-static-i18n
+1 -2
View File
@@ -2,8 +2,7 @@ To use a different Minecraft version, pass the `VERSION` environment variable (c
- LATEST (the default) - LATEST (the default)
- SNAPSHOT - SNAPSHOT
- a specific version, such as "1.7.9" - or a specific version, such as "1.7.9"
- or an alpha and beta version, such as "b1.7.3" (server download might not exist)
For example, to use the latest snapshot: For example, to use the latest snapshot:
+7 -6
View File
@@ -1,12 +1,13 @@
--- ---
site_name: Minecraft Server on Docker (Java Edition) site_name: Minecraft Server on Docker (Java Edition)
site_url: https://docker-minecraft-server.readthedocs.io/en/latest/ site_url: https://docker-minecraft-server.readthedocs.io/
site_description: Documentation for Minecraft Server on Docker site_description: Documentation for Minecraft Server on Docker
repo_url: https://github.com/itzg/docker-minecraft-server repo_url: https://github.com/itzg/docker-minecraft-server
edit_uri: blob/master/docs/ edit_uri: blob/master/docs/
theme: theme:
name: material name: material
features: features:
- navigation.instant
- navigation.tracking - navigation.tracking
- navigation.tabs - navigation.tabs
- navigation.tabs.sticky - navigation.tabs.sticky
@@ -53,6 +54,9 @@ copyright: Copyright © itzg 2023.
plugins: plugins:
- search - search
- autorefs - autorefs
- literate-nav:
nav_file: README.md
implicit_index: true
- mkdocstrings: - mkdocstrings:
handlers: handlers:
python: python:
@@ -64,11 +68,8 @@ plugins:
show_signature_annotations: true show_signature_annotations: true
# https://github.com/ultrabug/mkdocs-static-i18n # https://github.com/ultrabug/mkdocs-static-i18n
- i18n: - i18n:
default_language: en
languages: languages:
- locale: en en:
name: English name: English
build: true build: true
default: true
- literate-nav:
nav_file: README.md
implicit_index: true
+1
View File
@@ -8,6 +8,7 @@
: "${GID:=1000}" : "${GID:=1000}"
umask 0002 umask 0002
chmod g+w /data
if isTrue "${ENABLE_RCON:-true}" && ! [ -v RCON_PASSWORD ] && ! [ -v RCON_PASSWORD_FILE ]; then if isTrue "${ENABLE_RCON:-true}" && ! [ -v RCON_PASSWORD ] && ! [ -v RCON_PASSWORD_FILE ]; then
RCON_PASSWORD=$(openssl rand -hex 12) RCON_PASSWORD=$(openssl rand -hex 12)
+1 -5
View File
@@ -221,11 +221,7 @@ function copyFilesForCurseForge() {
cp -f /data/eula.txt "${FTB_DIR}/" cp -f /data/eula.txt "${FTB_DIR}/"
} }
if versionLessThan 'b1.8'; then if versionLessThan 1.7; then
echo "
DISABLE_HEALTHCHECK=true
" > /data/.mc-health.env
elif versionLessThan 1.7; then
echo " echo "
MC_HEALTH_EXTRA_ARGS=( MC_HEALTH_EXTRA_ARGS=(
--use-server-list-ping --use-server-list-ping
+1 -1
View File
@@ -229,7 +229,7 @@ function handleGenericPacks() {
function handleModrinthProjects() { function handleModrinthProjects() {
: "${MODRINTH_PROJECTS:=}" : "${MODRINTH_PROJECTS:=}"
: "${MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES:=true}" : "${MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES:=false}"
: "${MODRINTH_ALLOWED_VERSION_TYPE:=release}" : "${MODRINTH_ALLOWED_VERSION_TYPE:=release}"
if [[ $MODRINTH_PROJECTS ]] && isFamily HYBRID FORGE FABRIC SPIGOT; then if [[ $MODRINTH_PROJECTS ]] && isFamily HYBRID FORGE FABRIC SPIGOT; then
+1 -36
View File
@@ -2,21 +2,6 @@
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
: "${EXISTING_OPS_FILE:=SKIP}"
: "${EXISTING_WHITELIST_FILE:=SKIP}"
if [[ -v APPEND_OPS ]] && isTrue "${APPEND_OPS}"; then
EXISTING_OPS_FILE=MERGE
elif [[ -v OVERRIDE_OPS ]] && isTrue "${OVERRIDE_OPS}"; then
EXISTING_OPS_FILE=SYNCHRONIZE
fi
if [[ -v APPEND_WHITELIST ]] && isTrue "${APPEND_WHITELIST}"; then
EXISTING_WHITELIST_FILE=MERGE
elif [[ -v OVERRIDE_WHITELIST ]] && isTrue "${OVERRIDE_WHITELIST}"; then
EXISTING_WHITELIST_FILE=SYNCHRONIZE
fi
# shellcheck source=start-utils # shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils" . "${SCRIPTS:-/}start-utils"
isDebugging && set -x isDebugging && set -x
@@ -27,15 +12,10 @@ if isFalse "${ONLINE_MODE:-true}"; then
fi fi
if [[ -v OPS_FILE ]]; then if [[ -v OPS_FILE ]]; then
existing="$EXISTING_OPS_FILE"
if [[ "$EXISTING_OPS_FILE" = SYNC_FILE_MERGE_LIST ]]; then
existing=SYNCHRONIZE
fi
mc-image-helper manage-users \ mc-image-helper manage-users \
"${sharedArgs[@]}" \ "${sharedArgs[@]}" \
--type=JAVA_OPS \ --type=JAVA_OPS \
--input-is-file \ --input-is-file \
--existing="${existing}" \
"$OPS_FILE" "$OPS_FILE"
fi fi
if [[ -v OPS ]]; then if [[ -v OPS ]]; then
@@ -43,44 +23,29 @@ if [[ -v OPS ]]; then
if isTrue "${APPEND_OPS:-false}" || isFalse "${OVERRIDE_OPS:-true}"; then if isTrue "${APPEND_OPS:-false}" || isFalse "${OVERRIDE_OPS:-true}"; then
args+=(--append-only) args+=(--append-only)
fi fi
existing="$EXISTING_OPS_FILE"
if [[ "$EXISTING_OPS_FILE" = SYNC_FILE_MERGE_LIST ]]; then
existing=MERGE
fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
mc-image-helper manage-users \ mc-image-helper manage-users \
"${sharedArgs[@]}" "${args[@]}" \ "${sharedArgs[@]}" "${args[@]}" \
--type=JAVA_OPS \ --type=JAVA_OPS \
--existing="${existing}" \
$OPS $OPS
fi fi
if [[ -v WHITELIST_FILE ]]; then if [[ -v WHITELIST_FILE ]]; then
existing="$EXISTING_WHITELIST_FILE"
if [[ "$EXISTING_WHITELIST_FILE" = SYNC_FILE_MERGE_LIST ]]; then
existing=SYNCHRONIZE
fi
mc-image-helper manage-users \ mc-image-helper manage-users \
"${sharedArgs[@]}" \ "${sharedArgs[@]}" \
--type=JAVA_WHITELIST \ --type=JAVA_WHITELIST \
--input-is-file \ --input-is-file \
--existing="${existing}" \ "$WHITELIST_FILE"
"$WHITELIST_FILE"
fi fi
if [[ -v WHITELIST ]]; then if [[ -v WHITELIST ]]; then
args=() args=()
if isTrue "${APPEND_WHITELIST:-false}" || isFalse "${OVERRIDE_WHITELIST:-true}"; then if isTrue "${APPEND_WHITELIST:-false}" || isFalse "${OVERRIDE_WHITELIST:-true}"; then
args+=(--append-only) args+=(--append-only)
fi fi
existing="$EXISTING_WHITELIST_FILE"
if [[ "$EXISTING_WHITELIST_FILE" = SYNC_FILE_MERGE_LIST ]]; then
existing=MERGE
fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
mc-image-helper manage-users \ mc-image-helper manage-users \
"${sharedArgs[@]}" "${args[@]}" \ "${sharedArgs[@]}" "${args[@]}" \
--type=JAVA_WHITELIST \ --type=JAVA_WHITELIST \
--existing="${existing}" \
$WHITELIST $WHITELIST
fi fi