Compare commits
109 Commits
Author | SHA1 | Date |
---|---|---|
Edwin | 820d401911 | |
noah1019 | 20d80bb600 | |
Geoff Bourne | e172b52027 | |
dependabot[bot] | 36c92be777 | |
Geoff Bourne | e59d5ff13b | |
Geoff Bourne | ddfb99a1fc | |
Geoff Bourne | 1de2d34c64 | |
Geoff Bourne | 65371be1eb | |
Geoff Bourne | e6b525a65c | |
Juan Jesús Alejo Sillero | ed1c679559 | |
dependabot[bot] | e727602e51 | |
Geoff Bourne | 180b6535b3 | |
dependabot[bot] | 3842ac4693 | |
Geoff Bourne | 340284913c | |
Geoff Bourne | 07e89bff53 | |
Geoff Bourne | e1262effef | |
Geoff Bourne | cbcdfdc288 | |
dependabot[bot] | 120e1c21bf | |
dependabot[bot] | 8557749d1d | |
Geoff Bourne | 5c8e2bb0ba | |
MASACR99 | f659c56f18 | |
dependabot[bot] | f06ebae451 | |
Geoff Bourne | 7153e1443a | |
dependabot[bot] | d6cc10315b | |
dependabot[bot] | e8b46a3bcc | |
Geoff Bourne | 4eb25f3cbc | |
Geoff Bourne | 234863a026 | |
Geoff Bourne | c05b7cfa72 | |
Geoff Bourne | 2a864f3106 | |
Geoff Bourne | 4e3198cbec | |
Anton Curanz | 94c8a86c7c | |
Geoff Bourne | 1d57487766 | |
dependabot[bot] | f23403a31c | |
dependabot[bot] | 7cecfde797 | |
Geoff Bourne | 15a84ec316 | |
Bailey Allen | 38c8399880 | |
dependabot[bot] | c666cf28f4 | |
Geoff Bourne | 7dce58b7f6 | |
Geoff Bourne | 5b920cca8f | |
Geoff Bourne | 09603f4003 | |
Geoff Bourne | 32aa681582 | |
Rover van der Noort | 4f474d38c4 | |
Geoff Bourne | 79ad259f1d | |
Geoff Bourne | 4348853e15 | |
Geoff Bourne | 8f13cd4496 | |
Geoff Bourne | 665ca9c61a | |
Geoff Bourne | cec8027844 | |
Geoff Bourne | e247348c47 | |
Geoff Bourne | b22c818f0e | |
dependabot[bot] | 55e7b8bee5 | |
Geoff Bourne | 00e04fc2d5 | |
Nilon123456789 | a46a506a1c | |
Geoff Bourne | 46fb560ed9 | |
dependabot[bot] | f10bb45964 | |
dependabot[bot] | e556353ebb | |
Geoff Bourne | 938b562d21 | |
Geoff Bourne | 35daf1441a | |
Geoff Bourne | 75f5647c93 | |
C0D3 M4513R | d7512c44a9 | |
Robin Brämer | 7419a66843 | |
Robin Brämer | eec264c8ca | |
Kaiede | 3d2b88effd | |
Geoff Bourne | 961bc7fdbf | |
dependabot[bot] | e33f87f841 | |
Geoff Bourne | ca352c2355 | |
dependabot[bot] | 01be571535 | |
dependabot[bot] | 51e56a2168 | |
Geoff Bourne | fc5f7fa5d5 | |
Geoff Bourne | e38cc6ec3b | |
dependabot[bot] | e152875f65 | |
dependabot[bot] | f5ceb60335 | |
nohehf | 23d20041fc | |
Geoff Bourne | 5979e65a01 | |
Geoff Bourne | d52b9b88a2 | |
Geoff Bourne | b957e4cdfa | |
Geoff Bourne | e816d37dc3 | |
Geoff Bourne | f17cdbee2b | |
Geoff Bourne | 40653003a4 | |
dependabot[bot] | 9a29d6812b | |
C0D3 M4513R | a03afd7650 | |
Geoff Bourne | f3bec94065 | |
Geoff Bourne | ac7bf437ca | |
Geoff Bourne | 14de9281e2 | |
Geoff Bourne | 6aaed2da68 | |
Geoff Bourne | 15c2e21e54 | |
Geoff Bourne | 730c228d48 | |
Geoff Bourne | b48a252dd6 | |
David Whittam | f9dd0f45ab | |
Geoff Bourne | 9c0aa776cd | |
dependabot[bot] | 69eb7488e0 | |
dependabot[bot] | 93af5297fc | |
Geoff Bourne | 629156e1b3 | |
Geoff Bourne | 5c0b449c79 | |
Geoff Bourne | c424dc0c47 | |
Geoff Bourne | 8222a79bf4 | |
Geoff Bourne | 6ae59e61fa | |
Geoff Bourne | 63b2e4484d | |
Geoff Bourne | 600472d7eb | |
Talesu | 1e2024e8db | |
Geoff Bourne | c2f41a48ef | |
Zyztem | 664b66dbb7 | |
Geoff Bourne | 52351a423a | |
Geoff Bourne | e23c73c83e | |
dependabot[bot] | 90ea47b792 | |
Geoff Bourne | 6ea7d5851d | |
dependabot[bot] | 161ca91ab3 | |
Geoff Bourne | 619cee5ae5 | |
Geoff Bourne | b73fb88b3b | |
Geoff Bourne | ca393c4fcf |
|
@ -11,9 +11,9 @@ body:
|
|||
|
||||
Please double check some things first:
|
||||
1. Do you just have a question about something? If so, asking in the [Q&A Discussions](https://github.com/itzg/docker-minecraft-server/discussions/categories/q-a) or asking on [the Discord server](https://discord.gg/DXfKpjB) would be best.
|
||||
2. Did you re-pull the newest image using `docker pull`?
|
||||
3. Is this bug happening after the `[init]` prefixed logs and after the log that says "Starting the Minecraft server"? If so, please report the bug with Mojang or the respective server provider.
|
||||
4. Are you seeing a performance problem? If so, that is typically outside the scope of the image setup mechanims. Ask a question as above or contact the respective server provider.
|
||||
2. Did you **re-pull the newest image** and confirmed the issue after that? Run `docker pull <image>` or if using a compose file, it's as easy as running `docker compose pull`. If using Kubernetes, add `imagePullPolicy: Always` to the container.
|
||||
4. Is this bug happening after the `[init]` prefixed logs and after the log that says "Starting the Minecraft server"? If so, please report the bug with Mojang or the respective server provider.
|
||||
5. Are you seeing a performance problem? If so, that is typically outside the scope of this image. Ask a question as above or contact the respective server provider.
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
|
|
|
@ -10,6 +10,7 @@ on:
|
|||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -24,67 +25,56 @@ jobs:
|
|||
- java17
|
||||
- java17-graalvm
|
||||
- java17-jdk
|
||||
- java17-openj9
|
||||
- java17-alpine
|
||||
- java8
|
||||
- java8-graalvm-ce
|
||||
- java8-multiarch
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java8-alpine
|
||||
- java11
|
||||
- java11-openj9
|
||||
- java11-jdk
|
||||
include:
|
||||
# JAVA 21:
|
||||
- variant: java21-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:21-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.20.2
|
||||
mcVersion: latest
|
||||
- variant: java21
|
||||
baseImage: eclipse-temurin:21-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.19.3
|
||||
mcVersion: latest
|
||||
- variant: java21-alpine
|
||||
baseImage: eclipse-temurin:21-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.19.3
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:17-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-jdk
|
||||
baseImage: eclipse-temurin:17-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-17-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
# JAVA 11:
|
||||
- variant: java11
|
||||
baseImage: adoptopenjdk:11-jre-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-jdk
|
||||
baseImage: adoptopenjdk:11-jdk-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-11-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-alpine
|
||||
baseImage: openjdk:8-jre-alpine3.9
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
|
@ -92,10 +82,6 @@ jobs:
|
|||
baseImage: ghcr.io/graalvm/graalvm-ce:java8
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-multiarch
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
@ -105,20 +91,20 @@ jobs:
|
|||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
|
||||
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
||||
MAIN_VARIANT: java17
|
||||
runs-on: ubuntu-20.04
|
||||
MAIN_VARIANT: java21
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.6
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.5.0
|
||||
uses: docker/metadata-action@v5.5.1
|
||||
with:
|
||||
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
||||
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
||||
|
@ -136,6 +122,8 @@ jobs:
|
|||
type=raw,value=stable,enable=${{ github.ref_type == 'tag' && matrix.variant == env.MAIN_VARIANT }}
|
||||
# apply the variant as a moving tag for most recent commit per variant
|
||||
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == github.event.repository.default_branch }}
|
||||
# for backward compatibility with users referencing java8-multiarch, this will set an extra label on java8
|
||||
type=raw,value=java8-multiarch,enable=${{ matrix.variant == 'java8' && github.ref_name == github.event.repository.default_branch }}
|
||||
# NOTE this identifies which variant will be published as "latest", which isn't
|
||||
# necessarily the newest version of Java
|
||||
flavor: |
|
||||
|
@ -144,13 +132,13 @@ jobs:
|
|||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.0.0
|
||||
uses: docker/setup-buildx-action@v3.3.0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.0.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
|
@ -173,14 +161,14 @@ jobs:
|
|||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.0.0
|
||||
uses: docker/login-action@v3.1.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3.0.0
|
||||
uses: docker/login-action@v3.1.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
@ -188,7 +176,7 @@ jobs:
|
|||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
|
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
|
|
@ -7,6 +7,7 @@ on:
|
|||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "docker-compose*.yml"
|
||||
- "mkdocs.yml"
|
||||
|
||||
|
@ -17,44 +18,44 @@ jobs:
|
|||
matrix:
|
||||
variant:
|
||||
- java21
|
||||
- java21-alpine
|
||||
- java17
|
||||
- java17-alpine
|
||||
- java8-multiarch
|
||||
- java8
|
||||
include:
|
||||
# JAVA 21:
|
||||
- variant: java21
|
||||
baseImage: eclipse-temurin:21-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.19.4
|
||||
mcVersion: latest
|
||||
- variant: java21-alpine
|
||||
baseImage: eclipse-temurin:21-jre-alpine
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.19.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.19.4
|
||||
- variant: java8-multiarch
|
||||
mcVersion: 1.20.4
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.1.6
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.0.0
|
||||
uses: docker/setup-buildx-action@v3.3.0
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
|
@ -64,7 +65,7 @@ jobs:
|
|||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
# Only build single platform since loading multi-arch image into daemon fails with
|
||||
# "docker exporter does not currently support exporting manifest lists"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
version: 2
|
||||
|
||||
build:
|
||||
|
|
22
Dockerfile
22
Dockerfile
|
@ -1,6 +1,6 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
|
||||
ARG BASE_IMAGE=eclipse-temurin:17-jre-focal
|
||||
ARG BASE_IMAGE=eclipse-temurin:21-jre
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
|
@ -9,14 +9,12 @@ ARG TARGETOS
|
|||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
# CI system should set this to a hash or git revision of the build directory and it's contents to
|
||||
# ensure consistent cache updates.
|
||||
ARG BUILD_FILES_REV=1
|
||||
ARG FORCE_INSTALL_PACKAGES=1
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} /build/run.sh setup-user
|
||||
/build/run.sh setup-user
|
||||
|
||||
COPY --chmod=644 files/sudoers* /etc/sudoers.d
|
||||
|
||||
|
@ -25,31 +23,31 @@ EXPOSE 25565
|
|||
ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
ARG EASY_ADD_VERSION=0.8.2
|
||||
ARG EASY_ADD_VERSION=0.8.5
|
||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
ARG RESTIFY_VERSION=1.7.1
|
||||
ARG RESTIFY_VERSION=1.7.2
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG RCON_CLI_VERSION=1.6.4
|
||||
ARG RCON_CLI_VERSION=1.6.6
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_MONITOR_VERSION=0.12.6
|
||||
ARG MC_MONITOR_VERSION=0.12.11
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.10.0
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.1
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.37.8
|
||||
ARG MC_HELPER_VERSION=1.38.15
|
||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||
# used for cache busting local copy of mc-image-helper
|
||||
ARG MC_HELPER_REV=1
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
. "/start-utils"
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
echo "ERROR: console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
|
||||
fi
|
||||
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "ERROR: pass console commands as arguments"
|
||||
exit 1
|
||||
|
|
|
@ -26,9 +26,14 @@ apk add --no-cache -U \
|
|||
zstd \
|
||||
nfs-utils \
|
||||
libpcap \
|
||||
libwebp
|
||||
libwebp \
|
||||
libcap
|
||||
|
||||
# Patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-alpine-amd64.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
|
|
|
@ -18,13 +18,15 @@ enabled=1
|
|||
EOF
|
||||
dnf update -y
|
||||
|
||||
dnf install -y ImageMagick \
|
||||
dnf install -y \
|
||||
ImageMagick \
|
||||
file \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils \
|
||||
curl \
|
||||
git \
|
||||
git-lfs \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
|
@ -40,9 +42,18 @@ dnf install -y ImageMagick \
|
|||
findutils \
|
||||
which
|
||||
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
|
||||
dnf update -y
|
||||
dnf install -y \
|
||||
git-lfs
|
||||
|
||||
bash /build/ol/install-gosu.sh
|
||||
|
||||
# Patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
|
|
|
@ -29,10 +29,19 @@ apt-get install -y \
|
|||
libpcap0.8 \
|
||||
webp
|
||||
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
git-lfs
|
||||
|
||||
apt-get clean
|
||||
|
||||
# Patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#
|
||||
# and then access http://localhost:8000
|
||||
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mkdocs:
|
||||
build:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -19,7 +19,9 @@ docker exec mc rcon-cli stop
|
|||
|
||||
_The `-i` is not needed in this case._
|
||||
|
||||
If rcon is disabled you can send commands by passing them as arguments to the packaged `mc-send-to-console` script. For example, a player can be op'ed in the container `mc` with:
|
||||
## When RCON is disabled
|
||||
|
||||
If rcon is disabled you can send commands by passing them as arguments to the packaged `mc-send-to-console` script after setting the env var `CREATE_CONSOLE_IN_PIPE` to "true". For example, a player can be op'ed in the container `mc` with:
|
||||
|
||||
```shell
|
||||
docker exec mc mc-send-to-console op player
|
||||
|
@ -27,9 +29,26 @@ docker exec mc mc-send-to-console op player
|
|||
+- container name +- Minecraft commands start here
|
||||
```
|
||||
|
||||
In order to attach and interact with the Minecraft server, add `-it` when starting the container, such as
|
||||
## Enabling interactive console
|
||||
|
||||
In order to attach and interact with the Minecraft server make sure to enable TTY and keep stdin open.
|
||||
|
||||
!!! example
|
||||
|
||||
With `docker run` use the `-it` arguments:
|
||||
|
||||
```shell
|
||||
docker run -d -it -p 25565:25565 --name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
or with a compose file:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
minecraft:
|
||||
stdin_open: true
|
||||
tty: true
|
||||
```
|
||||
|
||||
With that you can attach and interact at any time using
|
||||
|
||||
|
@ -37,9 +56,6 @@ With that you can attach and interact at any time using
|
|||
|
||||
and then Control-p Control-q to **detach**.
|
||||
|
||||
For remote access, configure your Docker daemon to use a `tcp` socket (such as `-H tcp://0.0.0.0:2375`)
|
||||
and attach from another machine:
|
||||
!!! info "RCON is required for fully interactive, color console"
|
||||
|
||||
docker -H $HOST:2375 attach mc
|
||||
|
||||
Unless you're on a home/private LAN, you should [enable TLS access](https://docs.docker.com/articles/https/).
|
||||
RCON must be enabled, which is the default, in order to use a fully interactive console with auto-completion and colorized log output.
|
|
@ -66,7 +66,6 @@ database:
|
|||
This is how your `docker-compose.yml` file could look like:
|
||||
|
||||
```yml
|
||||
version: "3.8"
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
|
|
|
@ -8,13 +8,47 @@ By default, the image declares an initial and maximum Java memory-heap limit of
|
|||
- `INIT_MEMORY`: independently sets the initial heap size
|
||||
- `MAX_MEMORY`: independently sets the max heap size
|
||||
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. For example:
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
|
||||
|
||||
-e MEMORY=2G
|
||||
!!! example "Using docker run"
|
||||
|
||||
```
|
||||
-e MEMORY=2G
|
||||
```
|
||||
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 2GB of memory:
|
||||
or to use init and max memory:
|
||||
|
||||
-e MEMORY="" -e JVM_XX_OPTS="-XX:MaxRAMPercentage=75" -m 2000M
|
||||
```
|
||||
-e INIT_MEMORY=1G -e MAX_MEMORY=4G
|
||||
```
|
||||
|
||||
!!! example "Using compose file"
|
||||
|
||||
```
|
||||
environment:
|
||||
MEMORY: 2G
|
||||
```
|
||||
|
||||
or to use init and max memory:
|
||||
|
||||
```
|
||||
environment:
|
||||
INIT_MEMORY: 1G
|
||||
MAX_MEMORY: 4G
|
||||
```
|
||||
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory:
|
||||
|
||||
!!! example "MaxRAMPercentage using compose file"
|
||||
|
||||
```
|
||||
environment:
|
||||
MEMORY: ""
|
||||
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
|
||||
deploy:
|
||||
limits:
|
||||
memory: 4G
|
||||
```
|
||||
|
||||
!!! important
|
||||
The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
|
||||
|
|
|
@ -41,21 +41,9 @@ See [Custom worlds directory path](../misc/world-data.md#custom-worlds-directory
|
|||
|
||||
## Interactive and Color Console
|
||||
|
||||
If you would like to `docker attach` to the Minecraft server console with color and interactive capabilities, then add
|
||||
When RCON is enabled, which is the default, and [TTY](https://docs.docker.com/compose/compose-file/05-services/#tty) is enabled on the container, then some server types will output colorized logs and provide a fully interactive console. To access the interactive console, use [`docker attach`](https://docs.docker.com/engine/reference/commandline/container_attach/) (not `exec`). When finished, make sure to use the sequence Control-P, Control-Q to detach without stopping the container.
|
||||
|
||||
```
|
||||
-e EXEC_DIRECTLY=true
|
||||
```
|
||||
|
||||
> **NOTES**
|
||||
>
|
||||
> This feature doesn't work via rcon, so you will need to `docker attach` to the container. Use the sequence Ctrl-P, Ctrl-Q to detach.
|
||||
>
|
||||
> This will bypass graceful server shutdown handling when using `docker stop`, so be sure the server console's `stop` command.
|
||||
>
|
||||
> Make to enable stdin and tty with `-it` when using `docker run` or `stdin_open: true` and `tty: true` when using docker compose.
|
||||
>
|
||||
> This feature is incompatible with Autopause and cannot be set when `ENABLE_AUTOPAUSE=true`.
|
||||
If this behavior interferes with the log content, then disable TTY or remove the setting entirely since the default is disabled. In a compose file, set the service's `tty` parameter to `false`. On the `docker run` command-line remove the `-t` argument.
|
||||
|
||||
## Server Shutdown Options
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@ If you prefer to manually manage the `server.properties` file, set `OVERRIDE_SER
|
|||
|
||||
!!! note
|
||||
|
||||
To clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. An unset variable is ignored and the existing `server.property` is left unchanged.
|
||||
To clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. An unset variable is ignored and the existing server property is left unchanged.
|
||||
|
||||
To see what `server.properties` will get used by the server, set the environment variable `DUMP_SERVER_PROPERTIES` to "true" and the contents of `server.properties` will get output before the server starts.
|
||||
|
||||
## Placeholders
|
||||
|
||||
|
@ -62,9 +64,25 @@ The section symbol (§) and other unicode characters are automatically converted
|
|||
|
||||
![](../img/motd-example.png)
|
||||
|
||||
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as
|
||||
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as the following example.
|
||||
|
||||
!!! example "Multi-line MOTD"
|
||||
|
||||
With `docker run`
|
||||
|
||||
```
|
||||
-e MOTD="Line one\nLine two"
|
||||
```
|
||||
|
||||
or within a compose file
|
||||
|
||||
```yaml
|
||||
MOTD: |
|
||||
line one
|
||||
line two
|
||||
# or
|
||||
# MOTD: "line one\nline two"
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
|
@ -128,6 +146,11 @@ To change the behavior when the whitelist file already exists, set the variable
|
|||
|
||||
To [enforce the whitelist changes immediately](https://minecraft.wiki/w/Server.properties#enforce-whitelist) when whitelist commands are used , set `ENFORCE_WHITELIST` to "true". If managing the whitelist file manually, `ENABLE_WHITELIST` can be set to "true" to set the `white-list` property.
|
||||
|
||||
!!! tip "Changing user API provider"
|
||||
|
||||
The usernames provided for whitelist and ops processing are resolved using either [PlayerDB](https://playerdb.co/) or [Mojang's API](https://wiki.vg/Mojang_API#Username_to_UUID). The default uses PlayerDB, but can be changed by setting the environment variable `USER_API_PROVIDER` to "mojang". Sometimes one or the other service can become overloaded, which is why there is the ability to switch providers.
|
||||
|
||||
|
||||
### Op/Administrator Players
|
||||
|
||||
Similar to the whitelist, users can be provisioned as operators (aka administrators) to your Minecraft server by
|
||||
|
@ -187,9 +210,13 @@ The server icon which has been set doesn't get overridden by default. It can be
|
|||
|
||||
RCON is **enabled by default** to allow for graceful shut down the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
|
||||
|
||||
The default password is randomly generated if `RCON_PASSWORD` has not been set.
|
||||
!!! warning
|
||||
|
||||
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
|
||||
Disabling RCON will remove and limit some features, such as interactive and color console support.
|
||||
|
||||
The default password is randomly generated on each startup; however, a specific one can be set with `RCON_PASSWORD`.
|
||||
|
||||
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you are aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
|
||||
|
||||
!!! info
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ 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 title="docker-compose.yml"
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
|
|
|
@ -39,7 +39,6 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||
4. Done! Point your client at your host's name/IP address and port 25565.
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
|
|
|
@ -45,7 +45,9 @@ The following environment variables define the behaviour of auto-pausing:
|
|||
|
||||
## Rootless Auto-Pause
|
||||
|
||||
If you're running the container as rootless, you might need to set change the default port forwarder from RootlessKit to slirp4netns.
|
||||
If you're running the container as rootless, then it is necessary to add the `CAP_NET_RAW` capability to the container, such as using [the `cap_add` service field](https://docs.docker.com/compose/compose-file/05-services/#cap_add) in a compose file or [`--cap-add` docker run argument](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities). It may also be necessary to set the environment variable `SKIP_SUDO` to "true".
|
||||
|
||||
You might need to set change the default port forwarder from RootlessKit to slirp4netns.
|
||||
|
||||
For Docker, see the following for setup:
|
||||
|
||||
|
@ -54,8 +56,9 @@ For Docker, see the following for setup:
|
|||
|
||||
For Podman, see the following for setup:
|
||||
- https://rootlesscontaine.rs/getting-started/podman/#changing-the-port-forwarder
|
||||
- Run with
|
||||
|
||||
```
|
||||
-e AUTOPAUSE_KNOCK_INTERFACE=tap0 --cap-add=CAP_NET_RAW --network slirp4netns:port_handler=slirp4netns
|
||||
```
|
||||
|
||||
!!! example "Using docker run"
|
||||
|
||||
-e AUTOPAUSE_KNOCK_INTERFACE=tap0 --cap-add=CAP_NET_RAW --network slirp4netns:port_handler=slirp4netns
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ Various examples are [maintained in the repository](https://github.com/itzg/dock
|
|||
Using the [GeyserMC plugin](https://geysermc.org/) with a Paper server (or similar) "enables clients from Minecraft Bedrock Edition to join your Minecraft Java server". The example also includes [Floodgate](https://wiki.geysermc.org/floodgate/) which "allows Xbox Live authenticated Bedrock users to join without a Java Edition account".
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
|
@ -33,13 +32,11 @@ Monitors network traffic to the Minecraft containers. If there is traffic, the c
|
|||
By using [Lazytainer](https://github.com/vmorganp/Lazytainer) with the [docker-minecraft-server](https://github.com/itzg/docker-minecraft-server) a somehow similar behaviour to [Lazymc](https://github.com/timvisee/lazymc) can be archived.
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
lazytainer:
|
||||
container_name: lazytainer
|
||||
image: ghcr.io/vmorganp/lazytainer:master
|
||||
environment:
|
||||
- VERBOSE=false
|
||||
VERBOSE: false
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
|
@ -54,13 +51,11 @@ services:
|
|||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
- EULA=TRUE
|
||||
- TYPE=PURPUR
|
||||
- MEMORY=4G
|
||||
- TZ=Europe/Berlin
|
||||
- OVERRIDE_SERVER_PROPERTIES=TRUE
|
||||
EULA: TRUE
|
||||
TYPE: PAPER
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- /opt/container_volumes/minecraft/data:/data
|
||||
- ./data:/data
|
||||
labels:
|
||||
- lazytainer.group=minecraft
|
||||
depends_on:
|
||||
|
@ -69,6 +64,5 @@ services:
|
|||
tty: true
|
||||
stdin_open: true
|
||||
restart: unless-stopped
|
||||
networks: {}
|
||||
```
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
|
|
@ -76,7 +76,7 @@ would expand to `https://cdn.example.org/configs-v9.0.1.zip,https://cdn.example.
|
|||
|
||||
If applying large generic packs, the update can be time-consuming. To skip the update set `SKIP_GENERIC_PACK_UPDATE_CHECK` to "true". Conversely, the generic pack(s) can be forced to be applied by setting `FORCE_GENERIC_PACK_UPDATE` to "true".
|
||||
|
||||
The most time-consuming portion of the generic pack update is generating and comparing the SHA1 checksum. To skip the checksum generation, set `SKIP_GENERIC_PACK_CHECKSUM` to "true.
|
||||
The most time-consuming portion of the generic pack update is generating and comparing the SHA1 checksum. To skip the checksum generation, set `SKIP_GENERIC_PACK_CHECKSUM` to "true".
|
||||
|
||||
## Mods/plugins list
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
mkdocs == 1.5.3
|
||||
mkdocs-material-extensions == 1.3.1
|
||||
mkdocs-material == 9.5.3
|
||||
mkdocs-autorefs == 0.5.0
|
||||
mkdocstrings == 0.24.0
|
||||
mkdocs-material == 9.5.24
|
||||
mkdocs-autorefs == 1.0.1
|
||||
mkdocstrings == 0.25.1
|
||||
mkdocs-literate-nav == 0.6.1
|
||||
mdx-gh-links == 0.4
|
||||
mkdocs-click == 0.8.1
|
||||
mkdocs-static-i18n == 1.2.0
|
||||
mkdocs-static-i18n == 1.2.3
|
|
@ -86,9 +86,9 @@ The following examples all refer to version 1.0.7 of ATM8:
|
|||
|
||||
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
|
||||
|
||||
!!! note "Mods need download report"
|
||||
!!! warning "Download using a browser"
|
||||
|
||||
A file called `MODS_NEED_DOWNLOAD.txt` will be created in the `/data` directory that lists the mods that need to be manually downloaded and where to get them.
|
||||
It's important to use a browser to download the files listed for manual download. If your Docker host is running without a graphical interface, then you can use `scp` or similar to transfer the files to it.
|
||||
|
||||
!!! example
|
||||
|
||||
|
@ -97,7 +97,7 @@ For mod, modpacks, and world files that are not allowed for automated download,
|
|||
1. Create a directory next to the `docker-compose.yml` file. The name doesn't matter, but "downloads" is the common convention
|
||||
2. From the "Mods Need Download" output, visit the download page of each, click on the file download and save that file into the directory created in the previous step
|
||||
3. Add a host directory mount to the volumes section where the container path **must be** `/downloads`. The snippet below shows how that will look
|
||||
4. Re-run `docker composwe up -d` to apply the changes
|
||||
4. Re-run `docker compose up -d` to apply the changes
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
|
@ -106,7 +106,7 @@ For mod, modpacks, and world files that are not allowed for automated download,
|
|||
|
||||
## Unpublished Modpacks
|
||||
|
||||
If you wish to use a unpublished modpack zip, set the container path to the file in `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, **the modpack slug or page URL must still be provided**.
|
||||
If you wish to use an unpublished modpack zip, set the container path to the file in `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, **the modpack slug or page URL must still be provided**.
|
||||
|
||||
!!! example
|
||||
|
||||
|
@ -207,11 +207,36 @@ Ant-style paths can include the following globbing/wildcard symbols:
|
|||
## World/Level Data
|
||||
|
||||
Some modpacks come with world/save data via a worlds file and/or the overrides provided with the modpack. Either approach can be selected to set the `LEVEL` to the resulting saves directory by setting `CF_SET_LEVEL_FROM` to either:
|
||||
|
||||
- `WORLD_FILE`
|
||||
- `OVERRIDES`
|
||||
|
||||
## Ignore missing files
|
||||
|
||||
Some mods use temporary files from the modpack and delete them when finished. Others will patch themselves and "disable" the original mod jar, such as gregtech. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma or newline delimited list to `CF_IGNORE_MISSING_FILES`.
|
||||
|
||||
!!! hint
|
||||
|
||||
A warning log will indicate what files were found to be missing from the previous installation run, such as
|
||||
|
||||
```
|
||||
Re-installing due to missing files from modpack: [mods/gregtech-2.6.2-beta.jar]
|
||||
```
|
||||
|
||||
!!! example
|
||||
|
||||
In a Compose file
|
||||
```yaml
|
||||
environment:
|
||||
CF_IGNORE_MISSING_FILES: |
|
||||
mods/gregtech-2.6.2-beta.jar
|
||||
```
|
||||
|
||||
|
||||
## Extra options
|
||||
|
||||
Other configuration available:
|
||||
|
||||
- `CF_PARALLEL_DOWNLOADS` (default is 4): specify how many parallel mod downloads to perform
|
||||
- `CF_OVERRIDES_SKIP_EXISTING` (default is false): if set, files in the overrides that already exist in the data directory are skipped. **NOTE** world data is always skipped, if present.
|
||||
- `CF_FORCE_REINSTALL_MODLOADER` (default is false): this can be set to `true` to force the modpack's declared modloader, such as Forge, to be reinstalled. This is useful if some of the modloader's files become corrupted.
|
||||
|
|
|
@ -59,4 +59,47 @@ To exclude client mods that are incorrectly declared by the modpack as server-co
|
|||
notenoughanimations
|
||||
lambdynamiclights
|
||||
euphoriapatcher
|
||||
```
|
||||
```
|
||||
|
||||
## Force-include files
|
||||
|
||||
To force include client mods, set `MODRINTH_FORCE_INCLUDE_FILES` to a comma or newline delimited list of partial file names. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
|
||||
|
||||
!!! example
|
||||
|
||||
In a Compose file:
|
||||
```yaml
|
||||
MODRINTH_FORCE_INCLUDE_FILES: |
|
||||
yet-another-config-lib
|
||||
```
|
||||
|
||||
## Excluding Overrides Files
|
||||
|
||||
Modrinth mrpack/zip files may include an `overrides` subdirectory that contains config files, world data, and extra mod files. All of those files will be extracted into the `/data` path of the container. If any of those files, such as incompatible mods, need to be excluded from extraction, then the `MODRINTH_OVERRIDES_EXCLUSIONS` variable can be set with a comma or newline delimited list of ant-style paths ([see below](#ant-style-paths)) to exclude, relative to the overrides (or `/data`) directory.
|
||||
|
||||
### Ant-style paths
|
||||
|
||||
Ant-style paths can include the following globbing/wildcard symbols:
|
||||
|
||||
| Symbol | Behavior |
|
||||
|--------|---------------------------------------------------------|
|
||||
| `*` | Matches zero, one, or many characters except a slash |
|
||||
| `**` | Matches zero, one, or many characters including slashes |
|
||||
| `?` | Matches one character |
|
||||
|
||||
!!! example
|
||||
|
||||
The following compose `environment` entries show how to exclude Iris and Sodium mods from the overrides
|
||||
|
||||
```yaml
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: mods/NekosEnchantedBooks-*.jar,mods/citresewn-*.jar
|
||||
```
|
||||
|
||||
or using newline delimiter, which improves maintainability
|
||||
|
||||
```yaml
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/NekosEnchantedBooks-*.jar
|
||||
mods/citresewn-*.jar
|
||||
```
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ A [Magma](https://magmafoundation.org/) server, which is a combination of Forge
|
|||
|
||||
!!! note
|
||||
|
||||
The Magma project [has been terminated](https://git.magmafoundation.org/magmafoundation/magma-1-20-x/-/commit/4e7abe37403c47d09b74b77bcfc26a19b18f5891). Please use Magma Maintained for 1.12.2, 1.18.2, 1.19.3, and 1.20.1, or Ketting for 1.20.2+.
|
||||
The Magma project has been terminated ([original link died](https://git.magmafoundation.org/magmafoundation/magma-1-20-x/-/commit/4e7abe37403c47d09b74b77bcfc26a19b18f5891), [alternate statement on their discord](https://discord.com/channels/612695539729039411/647287352833605662/1174412642962649198) ). Please use Magma Maintained for 1.12.2, 1.18.2 and 1.19.3, or Ketting for 1.20.1+.
|
||||
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
|
||||
|
||||
|
@ -25,18 +25,15 @@ A [Magma Maintained](https://github.com/magmamaintained/) server, which is a alt
|
|||
|
||||
### Ketting
|
||||
|
||||
A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is a alternative project of Magma 1.20.2+, can be used with
|
||||
A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is an alternative project of Magma 1.20.1+, can be used with
|
||||
|
||||
-e TYPE=KETTING
|
||||
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.2" or later.
|
||||
|
||||
In addition, `FORGE_VERSION` and `KETTING_VERSION` must be specified. You can find the supported `FORGE_VERSION` in the [project page](https://github.com/kettingpowered/Ketting-1-20-x), and `KETTING_VERSION` in the [release page](https://github.com/kettingpowered/Ketting-1-20-x/releases).
|
||||
|
||||
!!! note
|
||||
|
||||
The length of `KETTING_VERSION` is 8, not 7 since it is taken from an abbreviated git commit hash. The value can be found in a jar file link on an Assets section for each releases.
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.1" or later.
|
||||
|
||||
`FORGE_VERSION` and `KETTING_VERSION` may be specified; however, they will be defaulted by the [Ketting launcher](https://github.com/kettingpowered/kettinglauncher) otherwise.
|
||||
Available Ketting Versions may be found at [https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions](https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions).
|
||||
The Version structure is `MinecraftVersion-ForgeVersion-KettingVersion` (e.g. `1.20.1-47.2.20-0.1.4` is for Minecraft `1.20.1`, Forge `47.2.20` and Ketting `0.1.4`).
|
||||
|
||||
### Mohist
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><code>ENABLE_RCON</code></td>
|
||||
<td>Should RCON be enabled</td>
|
||||
<td>Enable/disable RCON support; however, be aware that disabling RCON will remove and limit some features, such as interactive and color console support.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,52 +1,115 @@
|
|||
## Running Minecraft server on different Java version
|
||||
## Image tags
|
||||
|
||||
!!! note
|
||||
Image references can either omit the tag, which implies the tag `latest`, such as
|
||||
|
||||
For Forge versions less than 1.18, you _must_ use the `java8-multiarch` (or other java8) image tag.
|
||||
itzg/minecraft-server
|
||||
|
||||
In general, if you see the following line in a server startup failure, then it means you need to be using Java 8 instead of the latest image Java version:
|
||||
or explicitly include the tag, such as
|
||||
|
||||
```
|
||||
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader
|
||||
cannot be cast to class java.net.URLClassLoader
|
||||
```
|
||||
itzg/minecraft-server:<tag>
|
||||
|
||||
When using the image `itzg/minecraft-server` without a tag, the `latest` image tag is implied from the table below. To use a different version of Java, please use an alternate tag to run your Minecraft server container. The `stable` tag is similar to `latest`; however, it tracks [the most recent repository release/tag](https://github.com/itzg/docker-minecraft-server/releases/latest).
|
||||
where `<tag>` refers to the first column of this table:
|
||||
|
||||
| Tag name | Java version | Linux | JVM Type | Architecture |
|
||||
|------------------|--------------|--------|----------------|-------------------|
|
||||
| latest | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| stable | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java8 | 8 | Alpine | Hotspot | amd64 |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
|
||||
| java8-multiarch | 8 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java11-jdk | 11 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
|
||||
| java11-openj9 | 11 | Debian | OpenJ9 | amd64 |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java17-jdk | 17 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
|
||||
| java17-openj9 | 17 | Debian | OpenJ9 | amd64 |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM | amd64,arm64 |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 |
|
||||
| java21-alpine | 21 | Alpine | Hotspot | amd64 |
|
||||
| java21 | 21 | Ubuntu | Hotspot | amd64,arm64 |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM | amd64,arm64 |
|
||||
| Tag | Java version | Linux | JVM Type | Architecture |
|
||||
|------------------|--------------|--------|--------------------|---------------------|
|
||||
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java17-jdk | 17 | Ubuntu | Hotspot+JDK | amd64, arm64, armv7 |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8-alpine | 8 | Alpine | Hotspot | amd64 (1) |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
|
||||
|
||||
For example, to use Java version 8 on any supported architecture:
|
||||
1. Why no arm64 for Java 17 Alpine? That is because the base images, such as [elipse-temurin](https://hub.docker.com/_/eclipse-temurin/tags?page=&page_size=&ordering=&name=17-jre-alpine) do not provide support for that. Use the Ubuntu based images instead.
|
||||
|
||||
docker run --name mc itzg/minecraft-server:java8-multiarch
|
||||
!!! example "Example using java8"
|
||||
|
||||
!!! note
|
||||
|
||||
Keep in mind that some versions of Minecraft server, such as Forge before 1.17, can't work on the newest versions of Java. Instead, one of the Java 8 images should be used. Also, FORGE doesn't support openj9 JVM implementation.
|
||||
With docker run command-line
|
||||
|
||||
Some versions of vanilla Minecraft, such as 1.10, also do not run correctly with Java 17. If in doubt, use `java8-multiarch` for any version less than 1.17.
|
||||
```
|
||||
docker run -it -e EULA=true itzg/minecraft-server:java8
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
```
|
||||
|
||||
### Deprecated Image Tags
|
||||
!!! note "Latest"
|
||||
|
||||
The "latest" tag shifts to include not only the latest features and bug fixes, but also the latest Java version that Mojang requires for the latest Minecraft version.
|
||||
|
||||
!!! tip "Class File Version"
|
||||
|
||||
If the Minecraft startup is logging an error about a "class file version", then refer [to this table](https://javaalmanac.io/bytecode/versions/) to identify the JDK/Java version corresponding to each class file version.
|
||||
|
||||
### Release versions
|
||||
|
||||
Since the tags referenced above will shift as the newest image build brings in new features and bug fixes, released variants of those can also be used to pin a specific build of the image.
|
||||
|
||||
The syntax of released image tags is:
|
||||
|
||||
itzg/minecraft-server:<release>-<java tag>
|
||||
|
||||
where `java tag` still refers to the first column of the table above and `release` refers to [one of the image releases](https://github.com/itzg/docker-minecraft-server/releases).
|
||||
|
||||
!!! example
|
||||
|
||||
For example, the 2024.4.0 release of the Java 17 image would be
|
||||
|
||||
```
|
||||
itzg/minecraft-server:2024.4.0-java17
|
||||
```
|
||||
|
||||
### Stable image tag
|
||||
|
||||
The `stable` image tag combines the benefits of `latest` and [release versions](#release-versions) since it shifts to refer to the most recently released version.
|
||||
|
||||
## Version compatibilities
|
||||
|
||||
[This section in the Minecraft wiki](https://minecraft.wiki/w/Tutorials/Update_Java#Why_update?) lists out versions of **vanilla** Minecraft versions and the corresponding Java version that is required.
|
||||
|
||||
### Forge versions
|
||||
|
||||
Forge and its mods sometimes utilize non-public APIs of the JVM and as such are suspceptible to becoming broken with newer Java versions.
|
||||
|
||||
#### Java 21
|
||||
|
||||
Some mods even up to Minecraft 1.21 require Java 17 and will not run on the latest Java version. If you see an error like the following then be sure to explicitly use a Java 17 tagged image:
|
||||
|
||||
```
|
||||
Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException: java.util.List
|
||||
at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:754)
|
||||
```
|
||||
|
||||
#### Java 8
|
||||
|
||||
For Forge versions less than 1.18, you _must_ use the `java8-multiarch` (or other java8) image tag.
|
||||
|
||||
In general, if you see the following line in a server startup failure, then it means you need to be using Java 8 instead of the latest image Java version:
|
||||
|
||||
```
|
||||
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader
|
||||
cannot be cast to class java.net.URLClassLoader
|
||||
```
|
||||
|
||||
Forge also doesn't support openj9 JVM implementation.
|
||||
|
||||
## Deprecated Image Tags
|
||||
|
||||
The following image tags have been deprecated and are no longer receiving updates:
|
||||
|
||||
- java19
|
||||
- adopt13
|
||||
- adopt14
|
||||
|
@ -55,4 +118,8 @@ The following image tags have been deprecated and are no longer receiving update
|
|||
- multiarch-latest
|
||||
- java16/java16-openj9
|
||||
- java17-graalvm-ce
|
||||
- java17-openj9
|
||||
- java20-graalvm, java20, java20-alpine
|
||||
- java8-multiarch is still built and pushed, but please move to java8 instead
|
||||
|
||||
[^1]: Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise.
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java17
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: MODRINTH
|
||||
MEMORY: 4G
|
||||
MODRINTH_MODPACK: better-mc-forge-bmc4
|
||||
MODRINTH_VERSION: v26
|
||||
MODRINTH_EXCLUDE_FILES: |
|
||||
citresewn
|
||||
oculus
|
||||
yungsmenutweaks
|
||||
notenoughanimations
|
||||
ryoamiclights
|
||||
euphoriapatcher
|
||||
entity_model_features
|
||||
entity_texture_features
|
||||
3dskinlayers
|
||||
connector
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/NekosEnchantedBooks-*.jar
|
||||
mods/citresewn-*.jar
|
||||
volumes:
|
||||
- data:/data
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
ports:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# CURSEFORGE #
|
||||
# #
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE_GENERIC_PACK #
|
||||
# #
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
# FTBA support is only available in non-Alpine images
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE GENERIC_PACK #
|
||||
# #
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-latest}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./data:/data
|
||||
- ./mods:/mods
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
@ -12,10 +10,5 @@ services:
|
|||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.19.2"
|
||||
DEBUG: "true"
|
||||
SETUP_ONLY: "true"
|
||||
tty: True
|
||||
stdin_open: True
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
tty: true
|
||||
stdin_open: true
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
version: '3.8'
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
# build: .
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
# feature https://docker-minecraft-server.readthedocs.io/en/latest/mods-and-plugins/spiget/
|
||||
# which uses the Spiget API at https://spiget.org/
|
||||
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,4 +1,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.
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
services:
|
||||
tailscale-client:
|
||||
image: tailscale/tailscale:latest
|
||||
container_name: tailscale
|
||||
hostname: tailscale-minecraft # This name will be the one on the tailscale network
|
||||
environment:
|
||||
TS_AUTHKEY: "tskey-auth-PLACE-YOUR-KEY-HERE"
|
||||
TS_STATE_DIR: "/var/lib/tailscale"
|
||||
TS_USERSPACE: "FALSE" # If not using Auto-pause it can be set as true
|
||||
volumes:
|
||||
- ./ts-minecraft/state:/var/lib/tailscale
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
cap_add:
|
||||
- net_admin
|
||||
- sys_module
|
||||
restart: unless-stopped
|
||||
# ports: # Not needed, tailscale is directly linking to the container.
|
||||
# - "25565:25565"
|
||||
minecraft-server:
|
||||
image: itzg/minecraft-server
|
||||
network_mode: container:tailscale
|
||||
stdin_open: true
|
||||
tty: true
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
# ENABLE_AUTOPAUSE: "TRUE"
|
||||
# AUTOPAUSE_KNOCK_INTERFACE: "tailscale0"
|
||||
# MAX_TICK_TIME: "-1"
|
||||
volumes:
|
||||
- minecraftserver:/data
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
volumes:
|
||||
minecraftserver:
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
version: '3'
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
- ./data:/data
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
restart: unless-stopped
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: FABRIC
|
||||
MODRINTH_PROJECTS: |
|
||||
jline4mcdsrv
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data: {}
|
|
@ -0,0 +1,11 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: KETTING
|
||||
VERSION: 1.20.1
|
||||
CF_API_KEY: "${CF_API_KEY}"
|
||||
CURSEFORGE_FILES: https://www.curseforge.com/minecraft/mc-mods/aquaculture
|
||||
ports:
|
||||
- "25565:25565"
|
|
@ -1,10 +1,8 @@
|
|||
version: "3"
|
||||
services:
|
||||
lazytainer:
|
||||
container_name: lazytainer
|
||||
image: ghcr.io/vmorganp/lazytainer:master
|
||||
environment:
|
||||
- VERBOSE=false
|
||||
VERBOSE: false
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
|
@ -19,13 +17,11 @@ services:
|
|||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
- EULA=TRUE
|
||||
- TYPE=PURPUR
|
||||
- MEMORY=4G
|
||||
- TZ=Europe/Berlin
|
||||
- OVERRIDE_SERVER_PROPERTIES=TRUE
|
||||
EULA: TRUE
|
||||
TYPE: PAPER
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- /opt/container_volumes/minecraft/data:/data
|
||||
- ./data:/data
|
||||
labels:
|
||||
- lazytainer.group=minecraft
|
||||
depends_on:
|
||||
|
@ -34,4 +30,3 @@ services:
|
|||
tty: true
|
||||
stdin_open: true
|
||||
restart: unless-stopped
|
||||
networks: {}
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: itzg/bungeecord
|
||||
|
@ -10,7 +8,16 @@ services:
|
|||
volumes:
|
||||
- waterfall:/server
|
||||
- ./waterfall-config:/config
|
||||
|
||||
# If you want to use Velocity here is a premade version that supports Velocity
|
||||
# velocity-proxy:
|
||||
# image: itzg/bungeecord
|
||||
# environment:
|
||||
# TYPE: VELOCITY
|
||||
# ports:
|
||||
# - "25565:25577"
|
||||
# volumes:
|
||||
# - velocity:/server
|
||||
# - ./velocity-config:/config
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
|
@ -38,4 +45,4 @@ networks:
|
|||
dbs:
|
||||
# declared in ../dbs
|
||||
external: true
|
||||
name: dbs_default
|
||||
name: dbs_default
|
||||
|
|
|
@ -0,0 +1,155 @@
|
|||
# Config version. Do not change this
|
||||
config-version = "2.6"
|
||||
|
||||
# What port should the proxy be bound to? By default, we'll bind to all addresses on port 25565.
|
||||
bind = "0.0.0.0:25565"
|
||||
|
||||
# What should be the MOTD? This gets displayed when the player adds your server to
|
||||
# their server list. Only MiniMessage format is accepted.
|
||||
motd = "<#09add3>A Velocity Server"
|
||||
|
||||
# What should we display for the maximum number of players? (Velocity does not support a cap
|
||||
# on the number of players online.)
|
||||
show-max-players = 500
|
||||
|
||||
# Should we authenticate players with Mojang? By default, this is on.
|
||||
online-mode = true
|
||||
|
||||
# Should the proxy enforce the new public key security standard? By default, this is on.
|
||||
force-key-authentication = true
|
||||
|
||||
# If client's ISP/AS sent from this proxy is different from the one from Mojang's
|
||||
# authentication server, the player is kicked. This disallows some VPN and proxy
|
||||
# connections but is a weak form of protection.
|
||||
prevent-client-proxy-connections = false
|
||||
|
||||
# Should we forward IP addresses and other data to backend servers?
|
||||
# Available options:
|
||||
# - "none": No forwarding will be done. All players will appear to be connecting
|
||||
# from the proxy and will have offline-mode UUIDs.
|
||||
# - "legacy": Forward player IPs and UUIDs in a BungeeCord-compatible format. Use this
|
||||
# if you run servers using Minecraft 1.12 or lower.
|
||||
# - "bungeeguard": Forward player IPs and UUIDs in a format supported by the BungeeGuard
|
||||
# plugin. Use this if you run servers using Minecraft 1.12 or lower, and are
|
||||
# unable to implement network level firewalling (on a shared host).
|
||||
# - "modern": Forward player IPs and UUIDs as part of the login process using
|
||||
# Velocity's native forwarding. Only applicable for Minecraft 1.13 or higher.
|
||||
player-info-forwarding-mode = "NONE"
|
||||
|
||||
# If you are using modern or BungeeGuard IP forwarding, configure a file that contains a unique secret here.
|
||||
# The file is expected to be UTF-8 encoded and not empty.
|
||||
forwarding-secret-file = "forwarding.secret"
|
||||
|
||||
# Announce whether or not your server supports Forge. If you run a modded server, we
|
||||
# suggest turning this on.
|
||||
#
|
||||
# If your network runs one modpack consistently, consider using ping-passthrough = "mods"
|
||||
# instead for a nicer display in the server list.
|
||||
announce-forge = false
|
||||
|
||||
# If enabled (default is false) and the proxy is in online mode, Velocity will kick
|
||||
# any existing player who is online if a duplicate connection attempt is made.
|
||||
kick-existing-players = false
|
||||
|
||||
# Should Velocity pass server list ping requests to a backend server?
|
||||
# Available options:
|
||||
# - "disabled": No pass-through will be done. The velocity.toml and server-icon.png
|
||||
# will determine the initial server list ping response.
|
||||
# - "mods": Passes only the mod list from your backend server into the response.
|
||||
# The first server in your try list (or forced host) with a mod list will be
|
||||
# used. If no backend servers can be contacted, Velocity won't display any
|
||||
# mod information.
|
||||
# - "description": Uses the description and mod list from the backend server. The first
|
||||
# server in the try (or forced host) list that responds is used for the
|
||||
# description and mod list.
|
||||
# - "all": Uses the backend server's response as the proxy response. The Velocity
|
||||
# configuration is used if no servers could be contacted.
|
||||
ping-passthrough = "DISABLED"
|
||||
|
||||
# If not enabled (default is true) player IP addresses will be replaced by <ip address withheld> in logs
|
||||
enable-player-address-logging = true
|
||||
|
||||
[servers]
|
||||
# Configure your servers here. Each key represents the server's name, and the value
|
||||
# represents the IP address of the server to connect to.
|
||||
lobby = "127.0.0.1:30066"
|
||||
factions = "127.0.0.1:30067"
|
||||
minigames = "127.0.0.1:30068"
|
||||
|
||||
# In what order we should try servers when a player logs in or is kicked from a server.
|
||||
try = [
|
||||
"lobby"
|
||||
]
|
||||
|
||||
[forced-hosts]
|
||||
# Configure your forced hosts here.
|
||||
"lobby.example.com" = [
|
||||
"lobby"
|
||||
]
|
||||
"factions.example.com" = [
|
||||
"factions"
|
||||
]
|
||||
"minigames.example.com" = [
|
||||
"minigames"
|
||||
]
|
||||
|
||||
[advanced]
|
||||
# How large a Minecraft packet has to be before we compress it. Setting this to zero will
|
||||
# compress all packets, and setting it to -1 will disable compression entirely.
|
||||
compression-threshold = 256
|
||||
|
||||
# How much compression should be done (from 0-9). The default is -1, which uses the
|
||||
# default level of 6.
|
||||
compression-level = -1
|
||||
|
||||
# How fast (in milliseconds) are clients allowed to connect after the last connection? By
|
||||
# default, this is three seconds. Disable this by setting this to 0.
|
||||
login-ratelimit = 3000
|
||||
|
||||
# Specify a custom timeout for connection timeouts here. The default is five seconds.
|
||||
connection-timeout = 5000
|
||||
|
||||
# Specify a read timeout for connections here. The default is 30 seconds.
|
||||
read-timeout = 30000
|
||||
|
||||
# Enables compatibility with HAProxy's PROXY protocol. If you don't know what this is for, then
|
||||
# don't enable it.
|
||||
haproxy-protocol = false
|
||||
|
||||
# Enables TCP fast open support on the proxy. Requires the proxy to run on Linux.
|
||||
tcp-fast-open = false
|
||||
|
||||
# Enables BungeeCord plugin messaging channel support on Velocity.
|
||||
bungee-plugin-message-channel = true
|
||||
|
||||
# Shows ping requests to the proxy from clients.
|
||||
show-ping-requests = false
|
||||
|
||||
# By default, Velocity will attempt to gracefully handle situations where the user unexpectedly
|
||||
# loses connection to the server without an explicit disconnect message by attempting to fall the
|
||||
# user back, except in the case of read timeouts. BungeeCord will disconnect the user instead. You
|
||||
# can disable this setting to use the BungeeCord behavior.
|
||||
failover-on-unexpected-server-disconnect = true
|
||||
|
||||
# Declares the proxy commands to 1.13+ clients.
|
||||
announce-proxy-commands = true
|
||||
|
||||
# Enables the logging of commands
|
||||
log-command-executions = false
|
||||
|
||||
# Enables logging of player connections when connecting to the proxy, switching servers
|
||||
# and disconnecting from the proxy.
|
||||
log-player-connections = true
|
||||
|
||||
[query]
|
||||
# Whether to enable responding to GameSpy 4 query responses or not.
|
||||
enabled = false
|
||||
|
||||
# If query is enabled, on what port should the query protocol listen on?
|
||||
port = 25565
|
||||
|
||||
# This is the map name that is reported to the query services.
|
||||
map = "Velocity"
|
||||
|
||||
# Whether plugins should be shown in query response by default or not
|
||||
show-plugins = false
|
|
@ -0,0 +1,12 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOTD: |
|
||||
line one
|
||||
line two
|
||||
# or
|
||||
# MOTD: "line one\nline two"
|
||||
ports:
|
||||
- "25565:25565"
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
mc:
|
||||
build: .
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
proxies:
|
||||
proxy-protocol: true
|
|
@ -0,0 +1,15 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: PAPER
|
||||
ports:
|
||||
# Use host port 25566 assuming mc-router or similar is bound to 25565
|
||||
- "25566:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./config:/config:ro
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
# This runs the most recent version of Roguelike Adventures and Dungeons 2. Version 1.11 as of writing.
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons-2
|
||||
# Optional: select a specific version/file
|
||||
#CF_FILENAME_MATCHER: "0.2.34"
|
||||
CF_EXCLUDE_MODS: |
|
||||
auudio-forge
|
||||
betterf3
|
||||
better-third-person
|
||||
clickable-advancements
|
||||
controlling
|
||||
craftpresence
|
||||
creative-core
|
||||
default-options
|
||||
drippy-loading-screen
|
||||
embeddium
|
||||
embeddium-extension
|
||||
embeddium-extras
|
||||
equipment-compare
|
||||
ezzoom
|
||||
fading-night-vision
|
||||
fancymenu
|
||||
item-borders
|
||||
itemphysic-lite
|
||||
just-enough-resources-jer
|
||||
konkrete
|
||||
legendary-tooltips
|
||||
mouse-tweaks
|
||||
oauth
|
||||
oculus
|
||||
sound-filters
|
||||
textrues-embeddium-options
|
||||
toast-control
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: PAPER
|
||||
PLUGINS: https://github.com/SkriptLang/Skript/releases/download/2.8.4/Skript.jar
|
||||
SPIGET_RESOURCES: 103749
|
||||
ports:
|
||||
- "25565:25565"
|
|
@ -0,0 +1,13 @@
|
|||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: SPIGOT
|
||||
VERSION: 1.20.4
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- data:/data
|
||||
volumes:
|
||||
data: {}
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.3"
|
||||
|
||||
services:
|
||||
vanillatweaks_file:
|
||||
restart: "no"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
|
|
@ -45,7 +45,12 @@ if isTrue "${DEBUG_AUTOPAUSE}"; then
|
|||
knockdArgs+=(-D)
|
||||
fi
|
||||
|
||||
sudo /usr/local/sbin/knockd "${knockdArgs[@]}"
|
||||
if isTrue "${SKIP_SUDO}"; then
|
||||
/usr/local/sbin/knockd "${knockdArgs[@]}"
|
||||
else
|
||||
sudo /usr/local/sbin/knockd "${knockdArgs[@]}"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
logAutopause "Failed to start knockd daemon."
|
||||
logAutopause "Probable cause: Unable to attach to interface \"$AUTOPAUSE_KNOCK_INTERFACE\"."
|
||||
|
@ -124,11 +129,7 @@ do
|
|||
STATE=E
|
||||
else
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_KN))
|
||||
from=unknown
|
||||
if [ -e /var/log/knocked-source ]; then
|
||||
from=$(cat /var/log/knocked-source)
|
||||
fi
|
||||
logAutopause "Server was knocked from $from - waiting for clients or timeout"
|
||||
logAutopause "Server was knocked - waiting for clients or timeout"
|
||||
STATE=K
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -24,7 +24,9 @@ java_clients_connections() {
|
|||
local connections
|
||||
if java_running ; then
|
||||
if ! connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count); then
|
||||
connections=0
|
||||
# consider it a non-zero player count if the ping fails
|
||||
# otherwise a laggy server with players connected could get paused
|
||||
connections=1
|
||||
fi
|
||||
else
|
||||
connections=0
|
||||
|
|
|
@ -6,8 +6,6 @@ if isTrue "${DEBUG_AUTOPAUSE}"; then
|
|||
fi
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||
logAutopauseAction "Knocked from $1, resuming Java process"
|
||||
echo "$1" > /var/log/knocked-source
|
||||
pkill -CONT java
|
||||
|
||||
# remove .paused file from data directory
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"entity-texture-features-fabric",
|
||||
"entityculling",
|
||||
"extreme-sound-muffler",
|
||||
"free-cam",
|
||||
"ignitioncoil",
|
||||
"inmisaddon",
|
||||
"irisshaders",
|
||||
|
@ -59,6 +60,11 @@
|
|||
"excludes": [
|
||||
"modernfix"
|
||||
]
|
||||
},
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": [
|
||||
"just-enough-resources-jer"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,10 +33,11 @@ markdown_extensions:
|
|||
permalink: true
|
||||
- attr_list
|
||||
- def_list
|
||||
- footnotes
|
||||
- tables
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
line_spans: __span
|
||||
|
@ -49,7 +50,7 @@ markdown_extensions:
|
|||
user: camalot
|
||||
repo: mkdocs-test
|
||||
- mkdocs-click
|
||||
copyright: Copyright © itzg 2023.
|
||||
copyright: Copyright © itzg 2024.
|
||||
plugins:
|
||||
- search
|
||||
- autorefs
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -225,32 +225,26 @@ case "${TYPE^^}" in
|
|||
;;
|
||||
|
||||
CUSTOM)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCustom" "$@"
|
||||
;;
|
||||
|
||||
MAGMA)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMagma" "$@"
|
||||
;;
|
||||
|
||||
MAGMA_MAINTAINED)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMagmaMaintained" "$@"
|
||||
;;
|
||||
|
||||
KETTING)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployKetting" "$@"
|
||||
;;
|
||||
|
||||
MOHIST)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMohist" "$@"
|
||||
;;
|
||||
|
||||
CATSERVER)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCatserver" "$@"
|
||||
;;
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ set -eu
|
|||
: "${CF_FILENAME_MATCHER:=}"
|
||||
: "${CF_PARALLEL_DOWNLOADS:=4}"
|
||||
: "${CF_FORCE_SYNCHRONIZE:=false}"
|
||||
: "${CF_FORCE_REINSTALL_MODLOADER:=false}"
|
||||
: "${CF_IGNORE_MISSING_FILES:=}"
|
||||
: "${CF_EXCLUDE_INCLUDE_FILE=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json}"
|
||||
: "${CF_EXCLUDE_MODS:=}"
|
||||
: "${CF_FORCE_INCLUDE_MODS:=}"
|
||||
|
@ -23,6 +25,8 @@ resultsFile=/data/.install-curseforge.env
|
|||
|
||||
isDebugging && set -x
|
||||
|
||||
ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"
|
||||
|
||||
args=(
|
||||
--results-file="$resultsFile"
|
||||
)
|
||||
|
@ -47,8 +51,12 @@ fi
|
|||
if [[ ${CF_OVERRIDES_EXCLUSIONS} ]]; then
|
||||
args+=(--overrides-exclusions="$CF_OVERRIDES_EXCLUSIONS")
|
||||
fi
|
||||
if [[ ${CF_IGNORE_MISSING_FILES} ]]; then
|
||||
args+=(--ignore-missing-files="$CF_IGNORE_MISSING_FILES")
|
||||
fi
|
||||
args+=(
|
||||
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
|
||||
--force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER"
|
||||
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
set -e
|
||||
set -eo pipefail
|
||||
|
||||
function buildSpigotFromSource {
|
||||
if [[ ${TYPE^^} = *BUKKIT ]] && ! versionLessThan "1.14"; then
|
||||
|
@ -25,14 +25,14 @@ function buildSpigotFromSource {
|
|||
|
||||
case ${TYPE^^} in
|
||||
SPIGOT)
|
||||
if ! mv spigot-*.jar /data/${SERVER}; then
|
||||
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
|
||||
if ! mv craftbukkit-*.jar "/data/${SERVER}"; then
|
||||
log "ERR failed to build Spigot"
|
||||
cat /data/spigot_build.log
|
||||
exit 1
|
||||
|
@ -61,11 +61,14 @@ function downloadSpigot {
|
|||
esac
|
||||
|
||||
if [[ ${VERSION^^} = LATEST ]]; then
|
||||
VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]')
|
||||
if ! VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]'); then
|
||||
log "ERROR: failed to retrieve latest version from https://getbukkit.org/download/spigot -- site might be down"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z $downloadUrl ]]; then
|
||||
if versionLessThan 1.16.5 || ([[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VERSION} = "1.16.5" ]]); then
|
||||
if versionLessThan 1.16.5 || { [[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VERSION} = "1.16.5" ]] ; }; then
|
||||
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
|
||||
else
|
||||
downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
|
||||
|
@ -73,35 +76,50 @@ function downloadSpigot {
|
|||
fi
|
||||
|
||||
setServerVar
|
||||
curlArgs=()
|
||||
if [ -f "$SERVER" ] && ! isTrue "$FORCE_REDOWNLOAD"; then
|
||||
# tell curl to only download when newer
|
||||
curlArgs="-z $SERVER"
|
||||
curlArgs+=(-z "$SERVER")
|
||||
fi
|
||||
if isDebugging; then
|
||||
curlArgs="$curlArgs -v"
|
||||
curlArgs+=(-v)
|
||||
fi
|
||||
log "Downloading $match from $downloadUrl ..."
|
||||
curl -fsSL -o "$SERVER" $curlArgs "$downloadUrl"
|
||||
if [[ $? != 0 || $(grep -c "DOCTYPE html" $SERVER) != 0 ]]; then
|
||||
|
||||
tempFile="$SERVER.$$"
|
||||
|
||||
# HTTP error or download site responded with an HTML error page
|
||||
if ! curl -fsSL -o "$tempFile" "${curlArgs[@]}" "$downloadUrl" || ( [ -f "$tempFile" ] && grep -iq "doctype html" "$tempFile" ); then
|
||||
|
||||
cat <<EOF
|
||||
|
||||
ERROR: failed to download from $downloadUrl
|
||||
Visit https://getbukkit.org/download/${getbukkitFlavor} to lookup the
|
||||
exact version, such as 1.4.6-R0.4-SNAPSHOT or 1.8-R0.1-SNAPSHOT-latest.
|
||||
Click into the version entry to find the **exact** version, because something
|
||||
like "1.8" is not sufficient according to their download naming.
|
||||
exact version or see if download site is unavailable.
|
||||
Click into the version entry to find the **exact** version.
|
||||
|
||||
EOF
|
||||
|
||||
if isDebugging && [[ $(grep -c "DOCTYPE html" "$SERVER") != 0 ]]; then
|
||||
cat "$SERVER"
|
||||
if isDebugging && grep -iq "doctype html" "$tempFile"; then
|
||||
cat "$tempFile"
|
||||
fi
|
||||
|
||||
if [ -f "$SERVER" ]; then
|
||||
log "Continuing with existing $SERVER file"
|
||||
else
|
||||
# remove invalid download
|
||||
rm "$tempFile"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
else
|
||||
if [ -f "$tempFile" ]; then
|
||||
mv "$tempFile" "$SERVER"
|
||||
fi
|
||||
|
||||
# remove invalid download
|
||||
rm "$SERVER"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
|
||||
JVM_OPTS="${JVM_OPTS} -DIReallyKnowWhatIAmDoingISwear"
|
||||
export JVM_OPTS
|
||||
}
|
||||
|
@ -130,4 +148,4 @@ fi
|
|||
# Normalize on Spigot for operations below
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
|
|
@ -4,26 +4,27 @@
|
|||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
||||
: "${KETTING_VERSION:=}"
|
||||
: "${KETTING_TAG:=${KETTING_VERSION:0:7}}"
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
--output-directory=/data \
|
||||
--name-pattern="kettinglauncher-.+?(?<!-sources)\.jar" \
|
||||
kettingpowered/kettinglauncher
|
||||
); then
|
||||
log "ERROR: failed to download Ketting launcher"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
|
||||
resolveVersion
|
||||
|
||||
if ! downloadUrl="https://github.com/kettingpowered/Ketting-1-20-x/releases/download/${KETTING_TAG}/ketting-${VERSION}-${FORGE_VERSION}-${KETTING_VERSION}-server.jar"; then
|
||||
log "ERROR failed to locate latest Ketting download for ${VERSION}. Is that version supported?"
|
||||
exit 1
|
||||
EXTRA_ARGS+="-minecraftVersion $VERSION"
|
||||
if [[ ${KETTING_VERSION:-} ]]; then
|
||||
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl == null ]]; then
|
||||
log "ERROR Ketting does not seem to be available for $VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Ketting server jar from $downloadUrl"
|
||||
exit 1
|
||||
if [[ ${FORGE_VERSION:-} ]]; then
|
||||
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
|
||||
fi
|
||||
export EXTRA_ARGS
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
|
|
@ -11,6 +11,8 @@ resultsFile=/data/.install-modrinth.env
|
|||
: "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}"
|
||||
: "${MODRINTH_IGNORE_MISSING_FILES:=}"
|
||||
: "${MODRINTH_EXCLUDE_FILES:=}"
|
||||
: "${MODRINTH_FORCE_INCLUDE_FILES:=}"
|
||||
: "${MODRINTH_OVERRIDES_EXCLUSIONS:=}"
|
||||
|
||||
if [[ ! $MODRINTH_MODPACK ]]; then
|
||||
log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
|
||||
|
@ -19,6 +21,8 @@ fi
|
|||
|
||||
isDebugging && set -x
|
||||
|
||||
ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"
|
||||
|
||||
args=(
|
||||
--results-file="$resultsFile"
|
||||
--project="${MODRINTH_MODPACK}"
|
||||
|
@ -54,6 +58,8 @@ setArg --loader MODRINTH_LOADER
|
|||
setArg --version MODRINTH_VERSION
|
||||
setArg --default-version-type MODRINTH_DEFAULT_VERSION_TYPE
|
||||
setArg --exclude-files MODRINTH_EXCLUDE_FILES
|
||||
setArg --force-include-files MODRINTH_FORCE_INCLUDE_FILES
|
||||
setArg --overrides-exclusions MODRINTH_OVERRIDES_EXCLUSIONS
|
||||
|
||||
if ! mc-image-helper install-modrinth-modpack "${args[@]}"; then
|
||||
log "ERROR failed to install Modrinth modpack"
|
||||
|
|
|
@ -45,10 +45,17 @@ fi
|
|||
canUseRollingLogs=true
|
||||
useFallbackJvmFlag=false
|
||||
|
||||
if [[ ${FTB_DIR:-} ]]; then
|
||||
SERVER_DIR="$FTB_DIR"
|
||||
else
|
||||
SERVER_DIR=/data
|
||||
fi
|
||||
|
||||
|
||||
patchLog4jConfig() {
|
||||
file=${1?}
|
||||
url=${2?}
|
||||
if ! get -o "$file" "$url"; then
|
||||
if ! get -o "${SERVER_DIR}/${file}" "$url"; then
|
||||
log "ERROR: failed to download corrected log4j config, fallback to JVM flag"
|
||||
useFallbackJvmFlag=true
|
||||
return 1
|
||||
|
@ -94,14 +101,14 @@ if isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
|
|||
exit 1
|
||||
fi
|
||||
# Set up log configuration
|
||||
LOGFILE="/data/log4j2.xml"
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
if [ ! -e "$LOGFILE" ]; then
|
||||
log "Creating log4j2.xml in ${LOGFILE}"
|
||||
cp /image/log4j2.xml "$LOGFILE"
|
||||
else
|
||||
log "log4j2.xml already created, skipping"
|
||||
fi
|
||||
JVM_OPTS="-Dlog4j.configurationFile=/data/log4j2.xml ${JVM_OPTS}"
|
||||
JVM_OPTS="-Dlog4j.configurationFile=log4j2.xml ${JVM_OPTS}"
|
||||
fi
|
||||
|
||||
# Optional disable console
|
||||
|
@ -203,11 +210,6 @@ if [[ ${INIT_MEMORY} || ${MAX_MEMORY} ]]; then
|
|||
fi
|
||||
|
||||
function copyFilesForCurseForge() {
|
||||
# copy player modification files unconditionally since their
|
||||
# processing into json is additive anyway
|
||||
[ -f /data/ops.txt ] && cp -f /data/ops.txt "${FTB_DIR}/"
|
||||
[ -f /data/white-list.txt ] && cp -f /data/white-list.txt "${FTB_DIR}/"
|
||||
|
||||
if [ ! -e "${FTB_DIR}/server-icon.png" ] && [ -e /data/server-icon.png ]; then
|
||||
cp -f /data/server-icon.png "${FTB_DIR}/"
|
||||
fi
|
||||
|
@ -231,8 +233,10 @@ fi
|
|||
|
||||
mcServerRunnerArgs=(
|
||||
--stop-duration "${STOP_DURATION:-60}s"
|
||||
--named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
|
||||
)
|
||||
if isTrue "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
mcServerRunnerArgs+=(--named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}")
|
||||
fi
|
||||
if [[ ${STOP_SERVER_ANNOUNCE_DELAY} ]]; then
|
||||
mcServerRunnerArgs+=(--stop-server-announce-delay "${STOP_SERVER_ANNOUNCE_DELAY}s")
|
||||
fi
|
||||
|
@ -281,6 +285,11 @@ EOF
|
|||
if isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
"${finalArgs[@]}"
|
||||
else
|
||||
if [ -f "${FTB_DIR}/variables.txt" ]; then
|
||||
JVM_ARGS="${JVM_XX_OPTS} ${JVM_OPTS} $expandedDOpts"
|
||||
JVM_ARGS=${JVM_ARGS//$'\n'/}
|
||||
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
|
||||
fi
|
||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" "${finalArgs[@]}"
|
||||
fi
|
||||
elif [[ $SERVER =~ run.sh ]]; then
|
||||
|
@ -290,7 +299,10 @@ elif [[ $SERVER =~ run.sh ]]; then
|
|||
echo "SETUP_ONLY: bash ${SERVER}"
|
||||
exit
|
||||
fi
|
||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" --shell bash "${SERVER}"
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" --shell bash "${SERVER}" $EXTRA_ARGS
|
||||
else
|
||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||
if [ -f /data/bootstrap.txt ]; then
|
||||
|
|
|
@ -83,6 +83,9 @@ fi
|
|||
function handleListings() {
|
||||
if usesMods && usesPlugins; then
|
||||
if [[ "$MODS" ]]; then
|
||||
|
||||
ensureRemoveAllModsOff "MODS is set"
|
||||
|
||||
mkdir -p "$MODS_OUT_DIR"
|
||||
mc-image-helper mcopy \
|
||||
--glob=*.jar \
|
||||
|
@ -91,6 +94,7 @@ function handleListings() {
|
|||
"$MODS"
|
||||
fi
|
||||
if [[ "$PLUGINS" ]]; then
|
||||
ensureRemoveAllModsOff "PLUGINS is set"
|
||||
mkdir -p "$PLUGINS_OUT_DIR"
|
||||
mc-image-helper mcopy \
|
||||
--glob=*.jar \
|
||||
|
@ -100,6 +104,7 @@ function handleListings() {
|
|||
fi
|
||||
|
||||
if [[ "$MODS_FILE" ]]; then
|
||||
ensureRemoveAllModsOff "MODS_FILE is set"
|
||||
mkdir -p "$MODS_OUT_DIR"
|
||||
mc-image-helper mcopy \
|
||||
--file-is-listing \
|
||||
|
@ -108,6 +113,7 @@ function handleListings() {
|
|||
"$MODS_FILE"
|
||||
fi
|
||||
if [[ "$PLUGINS_FILE" ]]; then
|
||||
ensureRemoveAllModsOff "PLUGINS_FILE is set"
|
||||
mkdir -p "$PLUGINS_OUT_DIR"
|
||||
mc-image-helper mcopy \
|
||||
--file-is-listing \
|
||||
|
@ -123,6 +129,7 @@ function handleListings() {
|
|||
fi
|
||||
|
||||
if [[ "$MODS" || "$PLUGINS" ]]; then
|
||||
ensureRemoveAllModsOff "MODS or PLUGINS is set"
|
||||
mkdir -p "$outDir"
|
||||
mc-image-helper mcopy \
|
||||
--glob=*.jar \
|
||||
|
@ -132,6 +139,7 @@ function handleListings() {
|
|||
fi
|
||||
|
||||
if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then
|
||||
ensureRemoveAllModsOff "MODS_FILE or PLUGINS_FILE is set"
|
||||
mkdir -p "$outDir"
|
||||
mc-image-helper mcopy \
|
||||
--file-is-listing \
|
||||
|
@ -237,7 +245,7 @@ function handleModrinthProjects() {
|
|||
fi
|
||||
|
||||
if [[ $MODRINTH_PROJECTS ]] && isFamily HYBRID FORGE FABRIC SPIGOT; then
|
||||
if isFamily HYBRID FORGE; then
|
||||
if isFamily HYBRID; then
|
||||
loader=forge
|
||||
else
|
||||
loader="${TYPE,,}"
|
||||
|
@ -264,6 +272,13 @@ function handleCurseForgeFiles() {
|
|||
forge|fabric|quilt)
|
||||
args+=(--mod-loader "$TYPE")
|
||||
;;
|
||||
*)
|
||||
if isFamily HYBRID; then
|
||||
# To disambiguate mc-mods we'll assume that hybrid servers
|
||||
# are blending Forge (rather than Fabric or NeoForge)
|
||||
args+=(--mod-loader "forge")
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
|
|
|
@ -22,6 +22,11 @@ elif [[ -v OVERRIDE_WHITELIST ]] && isTrue "${OVERRIDE_WHITELIST}"; then
|
|||
fi
|
||||
|
||||
sharedArgs=(--version="$VERSION")
|
||||
if [[ ${FTB_DIR:-} ]]; then
|
||||
sharedArgs+=(--output-directory="$FTB_DIR")
|
||||
else
|
||||
sharedArgs+=(--output-directory=/data)
|
||||
fi
|
||||
|
||||
if [[ -v OPS_FILE ]]; then
|
||||
existing="$EXISTING_OPS_FILE"
|
||||
|
@ -37,13 +42,19 @@ if [[ -v OPS_FILE ]]; then
|
|||
fi
|
||||
if [[ -v OPS ]]; then
|
||||
args=()
|
||||
if isTrue "${APPEND_OPS:-false}" || isFalse "${OVERRIDE_OPS:-true}"; then
|
||||
args+=(--append-only)
|
||||
fi
|
||||
existing="$EXISTING_OPS_FILE"
|
||||
# Working with an OPS list, so normalize the value to a "non-file" mode
|
||||
if [[ "$EXISTING_OPS_FILE" = SYNC_FILE_MERGE_LIST ]]; then
|
||||
existing=MERGE
|
||||
fi
|
||||
# legacy option
|
||||
if [[ -v APPEND_OPS ]] && isTrue "${APPEND_OPS}"; then
|
||||
existing=MERGE
|
||||
fi
|
||||
# legacy option
|
||||
if [[ -v OVERRIDE_OPS ]] && isFalse "${OVERRIDE_OPS}"; then
|
||||
existing=SKIP
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
mc-image-helper manage-users \
|
||||
"${sharedArgs[@]}" "${args[@]}" \
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue