mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
196 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9140fb84a | ||
|
|
07708209a6 | ||
|
|
fd20fc9654 | ||
|
|
4085d28773 | ||
|
|
7dbeac99d3 | ||
|
|
e4773e47cb | ||
|
|
da4f7d0dd8 | ||
|
|
afbdfea0bb | ||
|
|
f5da624789 | ||
|
|
fdc1f446af | ||
|
|
1b8b694036 | ||
|
|
7974baca7e | ||
|
|
d4af9b1ae5 | ||
|
|
34187adca3 | ||
|
|
d0a3ee3b64 | ||
|
|
6683c91b74 | ||
|
|
a0e274a7b7 | ||
|
|
5d8a152db2 | ||
|
|
df8f8f1716 | ||
|
|
295996b033 | ||
|
|
5ac7b1d108 | ||
|
|
f420b92d05 | ||
|
|
96019b02ee | ||
|
|
c271ad99e0 | ||
|
|
222b522bc1 | ||
|
|
dd3c7a4b77 | ||
|
|
5340121d37 | ||
|
|
9546dd322d | ||
|
|
739cd5a320 | ||
|
|
09b716dd6b | ||
|
|
a7ecd92244 | ||
|
|
8685cc05c7 | ||
|
|
235141fcf3 | ||
|
|
cea839aa67 | ||
|
|
6d9c6d64e2 | ||
|
|
5d8b99c454 | ||
|
|
5113afccb5 | ||
|
|
0a7b1ed817 | ||
|
|
4fe1c2c7b4 | ||
|
|
8c0c27aef9 | ||
|
|
e9d7668cd8 | ||
|
|
06190ef9d0 | ||
|
|
1c780ff655 | ||
|
|
866f9c9d45 | ||
|
|
4da0e93c0f | ||
|
|
5415879cd2 | ||
|
|
28737a99bc | ||
|
|
f4634c3fd9 | ||
|
|
46ee2331bf | ||
|
|
edffc58589 | ||
|
|
be846dd369 | ||
|
|
de1d7f422c | ||
|
|
b393b22136 | ||
|
|
d7c6a7d2b6 | ||
|
|
0ff8e68f01 | ||
|
|
a71c5384b4 | ||
|
|
379cef3c7e | ||
|
|
163a268770 | ||
|
|
f84ae66af3 | ||
|
|
58face9c1b | ||
|
|
b8e6eea265 | ||
|
|
78b55df635 | ||
|
|
0f9941373b | ||
|
|
6ac313ae71 | ||
|
|
bc0a87cc53 | ||
|
|
5baf398af3 | ||
|
|
8dac5d1428 | ||
|
|
4232a981e8 | ||
|
|
b89c698676 | ||
|
|
8a5b5bbe70 | ||
|
|
11d8d917f2 | ||
|
|
2023f5aa31 | ||
|
|
bcd8db1306 | ||
|
|
62ce504da3 | ||
|
|
c87145a5e4 | ||
|
|
c4f69bf577 | ||
|
|
67b790dfed | ||
|
|
a55d575375 | ||
|
|
70cc1298c2 | ||
|
|
b9a61c8852 | ||
|
|
75496d6e0b | ||
|
|
50caaf98ef | ||
|
|
14a8f903ae | ||
|
|
c70f9c3fff | ||
|
|
a933e92460 | ||
|
|
4c42a3e46c | ||
|
|
1ccd6a0954 | ||
|
|
c3614466e7 | ||
|
|
3349df764e | ||
|
|
d3725c3388 | ||
|
|
63e8d33f6c | ||
|
|
a8b7ad533c | ||
|
|
fe5f066a0b | ||
|
|
47c2b60cba | ||
|
|
db88d167fe | ||
|
|
774d3bc717 | ||
|
|
c365a6cc5a | ||
|
|
cafb80eec3 | ||
|
|
bc789202a1 | ||
|
|
2e9be596f7 | ||
|
|
87afad69b3 | ||
|
|
fa058a18ad | ||
|
|
3936d56583 | ||
|
|
ca8abe3e16 | ||
|
|
ed7a6668aa | ||
|
|
c828985ebe | ||
|
|
8fd98f0315 | ||
|
|
708b6ab849 | ||
|
|
524ac1d0ec | ||
|
|
2cf4b98d76 | ||
|
|
b3e0ea14bf | ||
|
|
820d401911 | ||
|
|
20d80bb600 | ||
|
|
e172b52027 | ||
|
|
36c92be777 | ||
|
|
e59d5ff13b | ||
|
|
ddfb99a1fc | ||
|
|
1de2d34c64 | ||
|
|
65371be1eb | ||
|
|
e6b525a65c | ||
|
|
ed1c679559 | ||
|
|
e727602e51 | ||
|
|
180b6535b3 | ||
|
|
3842ac4693 | ||
|
|
340284913c | ||
|
|
07e89bff53 | ||
|
|
e1262effef | ||
|
|
cbcdfdc288 | ||
|
|
120e1c21bf | ||
|
|
8557749d1d | ||
|
|
5c8e2bb0ba | ||
|
|
f659c56f18 | ||
|
|
f06ebae451 | ||
|
|
7153e1443a | ||
|
|
d6cc10315b | ||
|
|
e8b46a3bcc | ||
|
|
4eb25f3cbc | ||
|
|
234863a026 | ||
|
|
c05b7cfa72 | ||
|
|
2a864f3106 | ||
|
|
4e3198cbec | ||
|
|
94c8a86c7c | ||
|
|
1d57487766 | ||
|
|
f23403a31c | ||
|
|
7cecfde797 | ||
|
|
15a84ec316 | ||
|
|
38c8399880 | ||
|
|
c666cf28f4 | ||
|
|
7dce58b7f6 | ||
|
|
5b920cca8f | ||
|
|
09603f4003 | ||
|
|
32aa681582 | ||
|
|
4f474d38c4 | ||
|
|
79ad259f1d | ||
|
|
4348853e15 | ||
|
|
8f13cd4496 | ||
|
|
665ca9c61a | ||
|
|
cec8027844 | ||
|
|
e247348c47 | ||
|
|
b22c818f0e | ||
|
|
55e7b8bee5 | ||
|
|
00e04fc2d5 | ||
|
|
a46a506a1c | ||
|
|
46fb560ed9 | ||
|
|
f10bb45964 | ||
|
|
e556353ebb | ||
|
|
938b562d21 | ||
|
|
35daf1441a | ||
|
|
75f5647c93 | ||
|
|
d7512c44a9 | ||
|
|
7419a66843 | ||
|
|
eec264c8ca | ||
|
|
3d2b88effd | ||
|
|
961bc7fdbf | ||
|
|
e33f87f841 | ||
|
|
ca352c2355 | ||
|
|
01be571535 | ||
|
|
51e56a2168 | ||
|
|
fc5f7fa5d5 | ||
|
|
e38cc6ec3b | ||
|
|
e152875f65 | ||
|
|
f5ceb60335 | ||
|
|
23d20041fc | ||
|
|
5979e65a01 | ||
|
|
d52b9b88a2 | ||
|
|
b957e4cdfa | ||
|
|
e816d37dc3 | ||
|
|
f17cdbee2b | ||
|
|
40653003a4 | ||
|
|
9a29d6812b | ||
|
|
a03afd7650 | ||
|
|
f3bec94065 | ||
|
|
ac7bf437ca | ||
|
|
14de9281e2 | ||
|
|
6aaed2da68 | ||
|
|
15c2e21e54 |
6
.github/ISSUE_TEMPLATE/bug.yml
vendored
6
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -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:
|
||||
|
||||
66
.github/workflows/build-multiarch.yml
vendored
66
.github/workflows/build-multiarch.yml
vendored
@@ -10,6 +10,8 @@ on:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -20,20 +22,16 @@ jobs:
|
||||
variant:
|
||||
- java21-graalvm
|
||||
- java21
|
||||
- java21-jdk
|
||||
- java21-alpine
|
||||
- java17
|
||||
- java17-graalvm
|
||||
- java17-jdk
|
||||
- java17-openj9
|
||||
- java17-alpine
|
||||
- java8
|
||||
- java8-graalvm-ce
|
||||
- java8-multiarch
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java11
|
||||
- java11-openj9
|
||||
- java11-jdk
|
||||
include:
|
||||
# JAVA 21:
|
||||
- variant: java21-graalvm
|
||||
@@ -44,58 +42,42 @@ jobs:
|
||||
baseImage: eclipse-temurin:21-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java21-jdk
|
||||
baseImage: eclipse-temurin:21
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java21-alpine
|
||||
baseImage: eclipse-temurin:21-jre-alpine
|
||||
platforms: linux/amd64
|
||||
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: latest
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:17-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java17-jdk
|
||||
baseImage: eclipse-temurin:17-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java17-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-17-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: latest
|
||||
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: openjdk:8-jre-alpine3.9
|
||||
platforms: linux/amd64
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-graalvm-ce
|
||||
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,13 +87,13 @@ 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.2.1
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
@@ -136,6 +118,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 +128,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.7.1
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.0.0
|
||||
uses: docker/setup-qemu-action@v3.2.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v6.9.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
@@ -173,14 +157,14 @@ jobs:
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.0.0
|
||||
uses: docker/login-action@v3.3.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.3.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -188,7 +172,7 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v6.9.0
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
|
||||
2
.github/workflows/discord.yml
vendored
2
.github/workflows/discord.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
- name: on-publish
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
uses: SethCohen/github-releases-to-discord@v1.15.0
|
||||
uses: SethCohen/github-releases-to-discord@v1.15.1
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: on-success
|
||||
|
||||
2
.github/workflows/stale-check.yml
vendored
2
.github/workflows/stale-check.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
28
.github/workflows/verify-pr.yml
vendored
28
.github/workflows/verify-pr.yml
vendored
@@ -7,6 +7,8 @@ on:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
- "docker-compose*.yml"
|
||||
- "mkdocs.yml"
|
||||
|
||||
@@ -17,44 +19,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: 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: latest
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: latest
|
||||
- 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.2.1
|
||||
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.7.1
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
uses: docker/build-push-action@v6.9.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
@@ -64,7 +66,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@v6.9.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:
|
||||
|
||||
31
Dockerfile
31
Dockerfile
@@ -1,6 +1,4 @@
|
||||
# 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 +7,17 @@ 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
|
||||
# The following three arg/env vars get used by the platform specific "install-packages" script
|
||||
ARG EXTRA_DEB_PACKAGES=""
|
||||
ARG EXTRA_DNF_PACKAGES=""
|
||||
ARG EXTRA_ALPINE_PACKAGES=""
|
||||
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 +26,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.8
|
||||
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.5
|
||||
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.9
|
||||
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.8
|
||||
ARG MC_MONITOR_VERSION=0.14.1
|
||||
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.11.0
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.3
|
||||
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.11
|
||||
ARG MC_HELPER_VERSION=1.40.2
|
||||
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
|
||||
@@ -76,4 +77,4 @@ RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPa
|
||||
RUN dos2unix /start* /auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m --interval=5s --retries=24 CMD mc-health
|
||||
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
||||
|
||||
@@ -13,6 +13,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
|
||||
echo "Java process suspended by Autopause function"
|
||||
exit 0
|
||||
else
|
||||
mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "${SERVER_PORT:-25565}"
|
||||
mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host "${SERVER_HOST:-localhost}" --port "${SERVER_PORT:-25565}"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
@@ -17,7 +17,7 @@ if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@ do
|
||||
if [[ "$RCON_CMDS_STARTUP" ]]; then
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_STARTUP"
|
||||
done <<< "$(echo -e "$RCON_CMDS_STARTUP")"
|
||||
fi
|
||||
if
|
||||
[[ -z "$RCON_CMDS_ON_CONNECT" ]] &&
|
||||
@@ -66,7 +66,7 @@ do
|
||||
logRcon "First Clients has Connected, running first connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_FIRST_CONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_FIRST_CONNECT")"
|
||||
fi
|
||||
|
||||
# When a client joins
|
||||
@@ -74,13 +74,13 @@ do
|
||||
logRcon "Clients have Connected, running connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_CONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_ON_CONNECT")"
|
||||
# When a client leaves
|
||||
elif (( CURR_CLIENTCONNECTIONS < CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_DISCONNECT" ]]; then
|
||||
logRcon "Clients have Disconnected, running disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_DISCONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_ON_DISCONNECT")"
|
||||
fi
|
||||
|
||||
# Last client connection
|
||||
@@ -89,7 +89,7 @@ do
|
||||
logRcon "ALL Clients have Disconnected, running last disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_LAST_DISCONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_LAST_DISCONNECT")"
|
||||
fi
|
||||
CLIENTCONNECTIONS=$CURR_CLIENTCONNECTIONS
|
||||
;;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
@@ -14,7 +16,8 @@ apk add --no-cache -U \
|
||||
procps \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils \
|
||||
curl \
|
||||
iputils \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
@@ -27,10 +30,18 @@ apk add --no-cache -U \
|
||||
nfs-utils \
|
||||
libpcap \
|
||||
libwebp \
|
||||
libcap
|
||||
libcap \
|
||||
${EXTRA_ALPINE_PACKAGES}
|
||||
|
||||
# Patched knockd
|
||||
# Download and install 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 globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
@@ -1,12 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64
|
||||
chmod +x /bin/gosu
|
||||
elif [[ $(uname -m) == "x86_64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64
|
||||
chmod +x /bin/gosu
|
||||
else
|
||||
echo "Not supported!"
|
||||
exit 1
|
||||
fi
|
||||
set -euo pipefail
|
||||
|
||||
GOSU_VERSION="1.16"
|
||||
GOSU_BASE_URL="https://github.com/tianon/gosu/releases/download/$GOSU_VERSION"
|
||||
|
||||
case $(uname -m) in
|
||||
"aarch64")
|
||||
GOSU_ARCH="gosu-arm64"
|
||||
;;
|
||||
"x86_64")
|
||||
GOSU_ARCH="gosu-amd64"
|
||||
;;
|
||||
*)
|
||||
echo "Architecture not supported!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -sL -o /bin/gosu "${GOSU_BASE_URL}/${GOSU_ARCH}"
|
||||
chmod +x /bin/gosu
|
||||
|
||||
@@ -4,21 +4,28 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Install and configure dnf
|
||||
microdnf install dnf -y
|
||||
|
||||
dnf install 'dnf-command(config-manager)' -y
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
tee /etc/yum.repos.d/ol8-epel.repo<<EOF
|
||||
|
||||
# Add EPEL repository
|
||||
tee /etc/yum.repos.d/ol8-epel.repo <<EOF
|
||||
[ol8_developer_EPEL]
|
||||
name= Oracle Linux \$releasever EPEL (\$basearch)
|
||||
name=Oracle Linux \$releasever EPEL (\$basearch)
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
EOF
|
||||
|
||||
# Update system
|
||||
dnf update -y
|
||||
|
||||
dnf install -y ImageMagick \
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
dnf install -y \
|
||||
ImageMagick \
|
||||
file \
|
||||
sudo \
|
||||
net-tools \
|
||||
@@ -38,12 +45,29 @@ dnf install -y ImageMagick \
|
||||
libpcap \
|
||||
libwebp \
|
||||
findutils \
|
||||
which
|
||||
which \
|
||||
${EXTRA_DNF_PACKAGES}
|
||||
|
||||
# Install Git LFS
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
|
||||
dnf update -y
|
||||
dnf install -y git-lfs
|
||||
|
||||
# Clean up DNF when done
|
||||
dnf clean all
|
||||
|
||||
# Install gosu (assuming the script /build/ol/install-gosu.sh exists and is executable)
|
||||
bash /build/ol/install-gosu.sh
|
||||
|
||||
# Patched knockd
|
||||
# Download and install 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 globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
|
||||
@@ -4,8 +4,9 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Update and install packages
|
||||
apt-get update
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
@@ -27,13 +28,26 @@ apt-get install -y \
|
||||
lbzip2 \
|
||||
nfs-common \
|
||||
libpcap0.8 \
|
||||
webp
|
||||
${EXTRA_DEB_PACKAGES}
|
||||
|
||||
# Install Git LFS
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
||||
apt-get update
|
||||
apt-get install -y git-lfs
|
||||
|
||||
# Clean up APT when done
|
||||
apt-get clean
|
||||
|
||||
# Patched knockd
|
||||
# Download and install 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 globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
if id ubuntu > /dev/null 2>&1; then
|
||||
deluser ubuntu
|
||||
fi
|
||||
|
||||
addgroup --gid 1000 minecraft
|
||||
adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
@@ -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:
|
||||
|
||||
@@ -55,6 +55,14 @@ To allow time for players to finish what they're doing during a graceful server
|
||||
|
||||
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
|
||||
|
||||
## Configuration Options for Minecraft Server Health Monitoring
|
||||
|
||||
The image tags include specific variables to simplify configuration for monitoring the health of a Minecraft server:
|
||||
|
||||
- `-e SERVER_HOST=localhost` : This variable sets the host address of the Minecraft server to be monitored. By default, it is set to `localhost`, but you can replace it with the actual hostname or IP address of your Minecraft server.
|
||||
|
||||
- `-e SERVER_PORT=25565` : This variable sets the port number on which the Minecraft server is running. By default, Minecraft servers run on port 25565, but if your server is configured to use a different port, you should replace `25565` with the correct port number. This helps the monitoring system to accurately check the health status of the Minecraft server on the specified port.
|
||||
|
||||
## OpenJ9 Specific Options
|
||||
|
||||
The openj9 image tags include specific variables to simplify configuration:
|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||
@@ -110,7 +128,7 @@ When either is set, [whitelisting of connecting users](https://minecraft.wiki/w/
|
||||
|
||||
To change the behavior when the whitelist file already exists, set the variable `EXISTING_WHITELIST_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
`SKIP`
|
||||
: Skip processing of the whitelist file when one is already present. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
@@ -119,7 +137,7 @@ To change the behavior when the whitelist file already exists, set the variable
|
||||
`MERGE`
|
||||
: Merge the list of users from `WHITELIST` into the existing file. `WHITELIST_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
`SYNC_FILE_MERGE_LIST` (default)
|
||||
: When `WHITELIST_FILE` is provided it will overwrite an existing whitelist file. Also, if `WHITELIST` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
@@ -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
|
||||
@@ -148,7 +171,7 @@ Similar to the whitelist, users can be provisioned as operators (aka administrat
|
||||
|
||||
To change the behavior when the ops file already exists, set the variable `EXISTING_OPS_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
`SKIP`
|
||||
: Skip processing of the ops file when one is already present. This is the same as setting the legacy variable `OVERRIDE_OPS` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
@@ -157,7 +180,7 @@ To change the behavior when the ops file already exists, set the variable `EXIST
|
||||
`MERGE`
|
||||
: Merge the list of users from `OPS` into the existing file. `OPS_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
`SYNC_FILE_MERGE_LIST` (default)
|
||||
: When `OPS_FILE` is provided it will overwrite an existing ops file. Also, if `OPS` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
@@ -472,4 +495,11 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| SIMULATION_DISTANCE | simulation-distance |
|
||||
| SYNC_CHUNK_WRITES | sync-chunk-writes |
|
||||
| USE_NATIVE_TRANSPORT | use-native-transport |
|
||||
|
||||
| HIDE_ONLINE_PLAYERS | hide-online-players |
|
||||
| RESOURCE_PACK_ID | resource-pack-id |
|
||||
| RESOURCE_PACK_PROMPT | resource-pack-prompt |
|
||||
| MAX_CHAINED_NEIGHBOR_UPDATES | max-chained-neighbor-updates |
|
||||
| LOG_IPS | log-ips |
|
||||
| REGION_FILE_COMPRESSION | region-file-compression |
|
||||
| BUG_REPORT_LINK | bug-report-link |
|
||||
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
An option to stop the server after a specified time has been added for niche applications (e.g. billing saving on AWS Fargate). The function is incompatible with the Autopause functionality, as they basically cancel out each other.
|
||||
|
||||
!!! note
|
||||
!!! note
|
||||
|
||||
the docker container variables have to be set accordingly (restart policy set to "no") and that the container has to be manually restarted.
|
||||
|
||||
@@ -25,3 +25,6 @@ The following environment variables define the behavior of auto-stopping:
|
||||
describes period of the daemonized state machine, that handles the stopping of the server
|
||||
|
||||
> To troubleshoot, add `DEBUG_AUTOSTOP=true` to see additional output
|
||||
|
||||
## Proxy Support
|
||||
If you make use of PROXY Protocol, i.e. through something like HAProxy or Fly.io, you will need to enable it in your variety of server's configuration, and then set the `USES_PROXY_PROTOCOL` envar to `true`. This lets Autostop monitor the server, where it otherwise wouldn't
|
||||
|
||||
@@ -26,3 +26,11 @@ or just a plain build
|
||||
```shell
|
||||
docker build -t IMG_PREFIX/minecraft-server .
|
||||
```
|
||||
|
||||
## Installing extra packages
|
||||
|
||||
The following build args can be set to install additional packages for the respective base image distro:
|
||||
|
||||
- `EXTRA_DEB_PACKAGES`
|
||||
- `EXTRA_DNF_PACKAGES`
|
||||
- `EXTRA_ALPINE_PACKAGES`
|
||||
|
||||
@@ -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:
|
||||
@@ -27,19 +26,65 @@ services:
|
||||
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/geyser/docker-compose.yml)
|
||||
|
||||
## Lazymc - Put your Minecraft server to rest when idle
|
||||
|
||||
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
- data:/server:ro
|
||||
# you need to supply the docker socket, so that the container can run docker command
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
# lazymc-docker-proxy acts as a proxy, so there is
|
||||
# no need to expose the server port on the Minecraft container
|
||||
- "25565:25565"
|
||||
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
- lazymc.group=mc
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
# so set restart to no, or else the container will start again...
|
||||
restart: no
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data:
|
||||
```
|
||||
[Source](https://github.com/joesturge/lazymc-docker-proxy/blob/master/docker-compose.yaml)
|
||||
|
||||
## Lazytainer - Stop Minecraft container based on traffic
|
||||
Monitors network traffic to the Minecraft containers. If there is traffic, the container runs, otherwise the container is stopped/paused.
|
||||
|
||||
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 +99,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 +112,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)
|
||||
@@ -6,7 +6,7 @@ Docker image that runs a Minecraft Bedrock server.
|
||||
|
||||
Lightweight multiplexer/proxy for Minecraft Java servers. Provided as a stand-alone application and a Docker image.
|
||||
|
||||
### [itzg/bungeecord](https://github.com/itzg/docker-bungeecord/)
|
||||
### [itzg/mc-proxy](https://github.com/itzg/docker-bungeecord/)
|
||||
|
||||
Docker image that runs a proxy powered by Bungeecord, Velocity, or Waterfall
|
||||
|
||||
|
||||
@@ -3,3 +3,5 @@ To troubleshoot the container initialization, such as when server files are pre-
|
||||
To troubleshoot just the command-line used to start the Minecraft server, set the environment variable `DEBUG_EXEC` to `true`.
|
||||
|
||||
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
|
||||
|
||||
If you are experiencing any issues with the "Changing ownership of /data" step, that can be disabled by setting `SKIP_CHOWN_DATA` to `true`.
|
||||
|
||||
@@ -47,3 +47,7 @@ naturalist
|
||||
aquaculture
|
||||
naturalist
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
The files processing can detect if a dependency is missing from the given list, but is not able to resolve the dependencies otherwise since their metadata only gives the mod ID and not the specific file version/ID that is needed.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -117,7 +117,7 @@ https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
|
||||
|
||||
Blank lines and lines that start with a `#` will be ignored
|
||||
|
||||
[This compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-mods-file.yml) shows another example of using this feature.
|
||||
[This compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/mods-file/docker-compose.yml) shows another example of using this feature.
|
||||
|
||||
## Remove old mods/plugins
|
||||
|
||||
|
||||
@@ -9,16 +9,18 @@
|
||||
|
|
||||
+-- project slug
|
||||
```
|
||||
Also, a specific version/type can be declared using colon symbol and version id/type after the project slug. The version id can be found in the 'Metadata' section. Valid version types are `release`, `beta`, `alpha`.
|
||||
|
||||
!!! example
|
||||
Also, a specific version (or release type) can be declared adding a colon and then the version id, version number/name, or release type after the project slug. The version ID or number can be found in the 'Metadata' section. Valid release types are `release`, `beta`, `alpha`.
|
||||
|
||||
To select a datapack from a Modrinth project, prefix the entry with "datapack:". When running a vanilla server, this is optional since only datapacks will be available for vanilla servers to select.
|
||||
|
||||
| Description | Example |
|
||||
|---------------------------------|-----------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:PbVeub96` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Description | Example projects entry |
|
||||
|---------------------------------|----------------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:PbVeub96` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
|
||||
## Extra options
|
||||
|
||||
@@ -26,5 +28,5 @@
|
||||
: Can be set to `none` (the default), `required`, or `optional` to download required and/or optional dependencies.
|
||||
|
||||
`MODRINTH_ALLOWED_VERSION_TYPE`
|
||||
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`.
|
||||
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. Setting to `beta` will pick up both release and beta versions. Setting to `alpha` will pick up release, beta, and alpha versions.
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
mkdocs == 1.5.3
|
||||
mkdocs-material == 9.5.7
|
||||
mkdocs-autorefs == 0.5.0
|
||||
mkdocstrings == 0.24.0
|
||||
mkdocs-material == 9.5.40
|
||||
mkdocs-autorefs == 1.2.0
|
||||
mkdocstrings == 0.26.2
|
||||
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
|
||||
@@ -164,6 +164,11 @@ Quite often there are mods that need to be excluded, such as ones that did not p
|
||||
|
||||
Mods can be excluded by passing a comma or space delimited list of **project** slugs or IDs via `CF_EXCLUDE_MODS`. Similarly, there are some mods that are incorrectly tagged as client only. For those, pass the **project** slugs or IDs via `CF_FORCE_INCLUDE_MODS`. These lists will be combined with the content of the exclude/include file, if given.
|
||||
|
||||
!!! note
|
||||
`CF_FORCE_INCLUDE_MODS` will not download additional mods.
|
||||
|
||||
For additional mods, refer to [the `CURSEFORGE_FILES` variable](../../mods-and-plugins/curseforge-files.md).
|
||||
|
||||
A mod's project ID can be obtained from the right hand side of the project page:
|
||||

|
||||
|
||||
@@ -207,12 +212,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,51 @@ 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
|
||||
```
|
||||
|
||||
## Default exclude/includes
|
||||
|
||||
The image comes with a default set of exclude/includes, maintained [in the repo files area](https://github.com/itzg/docker-minecraft-server/blob/master/files/modrinth-exclude-include.json) and uses the same [JSON schema](https://github.com/itzg/mc-image-helper?tab=readme-ov-file#excludeinclude-file-schema) as Auto CurseForge. Those defaults can be disabled by setting the env var `MODRINTH_DEFAULT_EXCLUDE_INCLUDES` to an empty string.
|
||||
|
||||
## 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://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge](https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge).
|
||||
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
|
||||
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
Enable Paper server mode by adding a `-e TYPE=PAPER` to your command-line.
|
||||
A [PaperMC server](https://papermc.io/) can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "PAPER".
|
||||
|
||||
By default, the container will run the latest build of [Paper server](https://papermc.io/downloads) but you can also choose to run a specific build with `-e PAPERBUILD=205`.
|
||||
By default, the container will find and download the latest build for the `VERSION` chosen. If `VERSION` is not specified, then the latest Minecraft version released by PaperMC is selected. Along with a specific `VERSION`, a specific Paper build can be selected by setting the environment variable `PAPER_BUILD`.
|
||||
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=PAPER \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "experimental", otherwise only release/default channel builds are selected.
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
docker run ... -e TYPE=PAPER ...
|
||||
|
||||
docker run ... -e TYPE=PAPER -e VERSION=1.20.6 ...
|
||||
|
||||
docker run ... -e TYPE=PAPER -e VERSION=1.20.6 -e PAPER_BUILD=140 ...
|
||||
|
||||
docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ...
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
If you see the following error, it likely means you need to set the env var `PAPER_CHANNEL` to "experimental"
|
||||
|
||||
```
|
||||
No build found for version 1.21 with channel 'default'
|
||||
```
|
||||
|
||||
If you are hosting your own copy of Paper you can override the download URL with `PAPER_DOWNLOAD_URL=<url>`.
|
||||
|
||||
@@ -47,13 +65,19 @@ Extra variables:
|
||||
|
||||
### Folia
|
||||
|
||||
Enable Folia server mode by adding a `-e TYPE=FOLIA` to your command-line.
|
||||
A [Folia server](https://papermc.io/software/folia) can be used by setting the environment variable `TYPE` to "FOLIA".
|
||||
|
||||
By default, the container will run the latest build of [Folia server](https://papermc.io/downloads), but you can also choose to run a specific build with `-e FOLIABUILD=26`.
|
||||
By default, the container will run the latest experimental build of [Folia server](https://papermc.io/downloads), but you can also choose to run a specific build with `-e FOLIABUILD=26`. The release channel can be changed with the variable `FOLIA_CHANNEL`; however, only experimental builds are available at this time.
|
||||
|
||||
!!! example
|
||||
|
||||
Using `docker run`
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=FOLIA \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
If you are hosting your own copy of Folia you can override the download URL with `FOLIA_DOWNLOAD_URL=<url>`.
|
||||
|
||||
|
||||
@@ -558,40 +558,40 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>BROADCAST_RCON_TO_OPS</code></td>
|
||||
<td>Should RCON be enabled</td>
|
||||
<td>Sets broadcast-rcon-to-ops server property</td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_CONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_DISCONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_LAST_DISCONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands to execute when the server starts.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_CONNECT</code></td>
|
||||
<td>RCON commands to execute whenever a client connects to the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_FIRST_CONNECT</code></td>
|
||||
<td>RCON commands to execute on the first client connection to the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_DISCONNECT</code></td>
|
||||
<td>RCON commands to execute whenever a client disconnects from the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_LAST_DISCONNECT</code></td>
|
||||
<td>RCON commands to execute when the last client disconnects from the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,53 +1,126 @@
|
||||
## 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[^1] | 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[^1] | 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-jdk | 21 | Ubuntu | Hotspot+JDK | 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-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-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.
|
||||
|
||||
### Class file version 65.0
|
||||
|
||||
If encountering a startup failure similar to the following examples, then ensure that the latest image has been re-pulled to use a Java 21. Alternatively, set the image tag specifically to `itzg/minecraft-server:java21`.
|
||||
|
||||
> Exception in thread "ServerMain" java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
|
||||
|
||||
or
|
||||
|
||||
> Error: LinkageError occurred while loading main class net.minecraft.bundler.Main
|
||||
java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
|
||||
|
||||
|
||||
### 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
|
||||
@@ -56,6 +129,9 @@ 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
|
||||
- java8-alpine
|
||||
|
||||
[^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.
|
||||
@@ -16,21 +16,6 @@ services:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
# Manually download the following and put into the 'downloads' directory next to this compose file
|
||||
#
|
||||
# Mod Filename Download page
|
||||
# =========================== ========================================= ====================================================================================
|
||||
# Fish of Thieves [Fabric 1.20.1] Fish of Thieves v3.0.3 https://www.curseforge.com/minecraft/mc-mods/fish-of-thieves/files/4958329
|
||||
# Only Hammers [FORGE/FABRIC] OnlyHammers-1.20.1-0.6-Fabric https://www.curseforge.com/minecraft/mc-mods/only-hammers-forge-fabric/files/4832068
|
||||
# Sprinklerz sprinklerz-0.5_fabric.jar https://www.curseforge.com/minecraft/mc-mods/sprinklerz/files/4835664
|
||||
# Frog Legs (Fabric/Forge) FrogLegs-v2.0.0-1.20.1-Fabric.jar https://www.curseforge.com/minecraft/mc-mods/froglegs/files/4917818
|
||||
# TrimsEffects [FABRIC] TrimsEffects - MC 1.20.X - 1.1.0 https://www.curseforge.com/minecraft/mc-mods/trimseffects/files/4954156
|
||||
# Display Case Display Case-fabric-1.20-1.0.8.jar https://www.curseforge.com/minecraft/mc-mods/displaycase/files/4921333
|
||||
# Structory: Towers Structory Towers 1.20.4 v1.0.6 https://www.curseforge.com/minecraft/mc-mods/structory-towers/files/4937875
|
||||
# Packet Fixer Packet Fixer Fabric 1.2.1 https://www.curseforge.com/minecraft/mc-mods/packet-fixer/files/4884316
|
||||
# Perfect Plushies Perfect Plushies 1.9.0 [Fabric] https://www.curseforge.com/minecraft/mc-mods/perfect-plushies/files/4985767
|
||||
# Structory Structory 1.20.2 v1.3.4 https://www.curseforge.com/minecraft/mc-mods/structory/files/4937872
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:java17
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
@@ -11,11 +9,10 @@ services:
|
||||
# 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/all-the-mods-8
|
||||
CF_FILENAME_MATCHER: "1.0.6"
|
||||
# CF_FILENAME_MATCHER: "1.1.0"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ../downloads:/downloads
|
||||
# Since Docker's default volume driver creates volumes owned by root, this
|
||||
# init container will change ownership to match final UID of mc service, above
|
||||
init-filebrowser:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
@@ -16,7 +14,6 @@ services:
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -1,8 +1,6 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
@@ -45,7 +43,6 @@ services:
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
@@ -9,11 +7,10 @@ services:
|
||||
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: better-mc-fabric-bmc1
|
||||
CF_FILENAME_MATCHER: v18.5
|
||||
# CF_FILENAME_MATCHER: v18.5
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc:/data
|
||||
- ../downloads:/downloads
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
|
||||
20
examples/bmc4/docker-compose.yml
Normal file
20
examples/bmc4/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: MODRINTH
|
||||
MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v32.5
|
||||
MODRINTH_EXCLUDE_FILES: |
|
||||
XaeroPlus
|
||||
XaerosWorldMap
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/citresewn-*.jar
|
||||
**/datapacks/BE_default_endgen_fix*
|
||||
MODRINTH_FORCE_SYNCHRONIZE: true
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
# declare /data volume mapping as desired
|
||||
# volumes:
|
||||
# - ./data:/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
|
||||
@@ -10,7 +8,6 @@ services:
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
ENABLE_AUTOPAUSE: "TRUE"
|
||||
OVERRIDE_SERVER_PROPERTIES: "TRUE"
|
||||
MAX_TICK_TIME: "-1"
|
||||
# More aggressive settings for demo purposes
|
||||
AUTOPAUSE_TIMEOUT_INIT: "30"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
35
examples/docker-compose-tailscale.yml
Normal file
35
examples/docker-compose-tailscale.yml
Normal file
@@ -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
|
||||
|
||||
11
examples/ketting/docker-compose.yml
Normal file
11
examples/ketting/docker-compose.yml
Normal file
@@ -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"
|
||||
40
examples/lazymc/docker_compose.yml
Normal file
40
examples/lazymc/docker_compose.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
- data:/server:ro
|
||||
# you need to supply the docker socket, so that the container can run docker command
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
# lazymc-docker-proxy acts as a proxy, so there is
|
||||
# no need to expose the server port on the Minecraft container
|
||||
- "25565:25565"
|
||||
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
- lazymc.group=mc
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
# so set restart to no, or else the container will start again...
|
||||
restart: no
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data:
|
||||
@@ -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,8 +1,6 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: itzg/bungeecord
|
||||
image: itzg/mc-proxy
|
||||
environment:
|
||||
TYPE: WATERFALL
|
||||
ports:
|
||||
@@ -12,7 +10,7 @@ services:
|
||||
- ./waterfall-config:/config
|
||||
# If you want to use Velocity here is a premade version that supports Velocity
|
||||
# velocity-proxy:
|
||||
# image: itzg/bungeecord
|
||||
# image: itzg/mc-proxy
|
||||
# environment:
|
||||
# TYPE: VELOCITY
|
||||
# ports:
|
||||
|
||||
12
examples/multiline-motd/docker-compose.yml
Normal file
12
examples/multiline-motd/docker-compose.yml
Normal file
@@ -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
|
||||
|
||||
60
examples/optimized-paper-config/README.md
Normal file
60
examples/optimized-paper-config/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# A Form to Load New Config Files to Paper MC
|
||||
|
||||
In this example, we illustrate how to efficiently load and manage different configuration files to optimize a Paper Minecraft server. To implement this, it is necessary to create a dedicated repository where the configuration files can be stored and later retrieved. The repository should adhere to a specific structure to facilitate seamless integration with your Docker setup. Notably, the configurations must be organized into a folder named after the version of Minecraft you are using.
|
||||
|
||||
For reference, I have provided this [repository](https://github.com/Alpha018/paper-config-optimized), which contains optimized configuration files for the latest version of Minecraft. You can use this repository by linking directly to the configuration files in your Docker file, as demonstrated in the example below.
|
||||
|
||||
## Usage
|
||||
|
||||
You can directly use the optimized configuration files from this repository by accessing them through the GitHub raw URLs. Simply replace the env var like the docker compose with any other repo with different configurations.
|
||||
|
||||
To use the raw files, you can download or link to them using the following pattern:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/[your-username]/[your-repository]/main/[file-path]"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
```
|
||||
|
||||
Feel free to explore and use the configurations in this repo to enhance your Minecraft server's performance.
|
||||
|
||||
## Contribution
|
||||
|
||||
If you'd like to improve or suggest changes to these configurations, feel free to submit a pull request in this [repository](https://github.com/Alpha018/paper-config-optimized). We welcome contributions from the community!
|
||||
|
||||
17
examples/optimized-paper-config/docker-compose.yml
Normal file
17
examples/optimized-paper-config/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
mc:
|
||||
build: .
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
|
||||
18
examples/prominence2/docker-compose.yml
Normal file
18
examples/prominence2/docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
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/prominence-2-rpg
|
||||
CF_FILENAME_MATCHER: "2.8.7"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
33
examples/rad2/compose.yaml
Normal file
33
examples/rad2/compose.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
# 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: |
|
||||
controlling
|
||||
craftpresence
|
||||
creative-core
|
||||
default-options
|
||||
equipment-compare
|
||||
item-borders
|
||||
itemphysic-lite
|
||||
konkrete
|
||||
oauth
|
||||
sound-filters
|
||||
toast-control
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
|
||||
21
examples/simple-voice-chat/fabric-compose.yaml
Normal file
21
examples/simple-voice-chat/fabric-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "FABRIC"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
21
examples/simple-voice-chat/neoforge-compose.yaml
Normal file
21
examples/simple-voice-chat/neoforge-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "NEOFORGE"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
21
examples/simple-voice-chat/paper-compose.yaml
Normal file
21
examples/simple-voice-chat/paper-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "PAPER"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
10
examples/skript/docker-compose.yml
Normal file
10
examples/skript/docker-compose.yml
Normal file
@@ -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"
|
||||
@@ -1,11 +1,8 @@
|
||||
# NOTE
|
||||
# This file is named spiget with an "e"
|
||||
# since it provides an example of the
|
||||
# This file is purposely named spiget with an "e" since it provides an example of the
|
||||
# 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
|
||||
@@ -15,8 +12,6 @@ services:
|
||||
EULA: "TRUE"
|
||||
TYPE: PAPER
|
||||
SPIGET_RESOURCES: 34315,3836
|
||||
REMOVE_OLD_MODS: true
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
- ./data:/data
|
||||
13
examples/spigot/docker-compose.yml
Normal file
13
examples/spigot/docker-compose.yml
Normal file
@@ -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
|
||||
@@ -18,10 +16,6 @@ services:
|
||||
ENABLE_COMMAND_BLOCK: true
|
||||
DIFFICULTY: hard
|
||||
volumes:
|
||||
# Need to place non-distributable mods in ./downloads/mods
|
||||
# As of Update-10.0.0
|
||||
# - Neon Craft 2 v2.2: https://www.curseforge.com/minecraft/mc-mods/neon-craft-2-mod/files/3726051
|
||||
- ./downloads:/downloads
|
||||
- mc-data:/data
|
||||
|
||||
volumes:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user