mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
252 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
730c228d48 | ||
|
|
b48a252dd6 | ||
|
|
f9dd0f45ab | ||
|
|
9c0aa776cd | ||
|
|
69eb7488e0 | ||
|
|
93af5297fc | ||
|
|
629156e1b3 | ||
|
|
5c0b449c79 | ||
|
|
c424dc0c47 | ||
|
|
8222a79bf4 | ||
|
|
6ae59e61fa | ||
|
|
63b2e4484d | ||
|
|
600472d7eb | ||
|
|
1e2024e8db | ||
|
|
c2f41a48ef | ||
|
|
664b66dbb7 | ||
|
|
52351a423a | ||
|
|
e23c73c83e | ||
|
|
90ea47b792 | ||
|
|
6ea7d5851d | ||
|
|
161ca91ab3 | ||
|
|
619cee5ae5 | ||
|
|
b73fb88b3b | ||
|
|
ca393c4fcf | ||
|
|
5729324195 | ||
|
|
a3b02ca3e3 | ||
|
|
815608929c | ||
|
|
7cb2c0ddc7 | ||
|
|
7a9e625935 | ||
|
|
9e49840a26 | ||
|
|
6f08613340 | ||
|
|
aec644dc3f | ||
|
|
63adc7bc6c | ||
|
|
6263cf419f | ||
|
|
b0605581c3 | ||
|
|
2cfd685def | ||
|
|
6adda8f1b2 | ||
|
|
cbd1e8d86d | ||
|
|
7fa522853f | ||
|
|
6b2bd0d035 | ||
|
|
6ac4586f26 | ||
|
|
65a3490f43 | ||
|
|
422db18b20 | ||
|
|
88c24292ec | ||
|
|
3ca66db8b4 | ||
|
|
150881a941 | ||
|
|
43accdf2f0 | ||
|
|
6363949bda | ||
|
|
b6b2da9d38 | ||
|
|
c40a47ebba | ||
|
|
94f9bc74f0 | ||
|
|
0f4cb9c429 | ||
|
|
66ed0eda1b | ||
|
|
ea3a6644a8 | ||
|
|
c0c6e6d78d | ||
|
|
2507028193 | ||
|
|
2084f1ea12 | ||
|
|
ca2c15ea8e | ||
|
|
a5ec64de24 | ||
|
|
33c75bd2da | ||
|
|
2917af8ca4 | ||
|
|
9d7232c8b8 | ||
|
|
051436c1df | ||
|
|
9b21661aaf | ||
|
|
47b903d134 | ||
|
|
fc4331232c | ||
|
|
5dc833c108 | ||
|
|
feb6a41c11 | ||
|
|
92947c92dc | ||
|
|
e8ffa0fc0d | ||
|
|
4c0bd61faf | ||
|
|
85a957fe6f | ||
|
|
37a5d50f70 | ||
|
|
eb279d0fa0 | ||
|
|
aba27ad444 | ||
|
|
f5c332736d | ||
|
|
bf621356c1 | ||
|
|
19948065d5 | ||
|
|
3b7ddcdbbd | ||
|
|
8c74fc34cb | ||
|
|
89889c556b | ||
|
|
951a55707d | ||
|
|
377273e5a3 | ||
|
|
78fd5457d4 | ||
|
|
2e07ba431d | ||
|
|
2dca9220e2 | ||
|
|
8ee9d6d2eb | ||
|
|
8faf560721 | ||
|
|
a1d0830a8e | ||
|
|
5642b8db35 | ||
|
|
ee562599f4 | ||
|
|
1ffcb5c221 | ||
|
|
8cdf4d0072 | ||
|
|
1545236cc6 | ||
|
|
2ebcc0fe00 | ||
|
|
e5f818bdf1 | ||
|
|
df497ce3d8 | ||
|
|
f7ff2779d9 | ||
|
|
c9e14864f5 | ||
|
|
ec539a5dd2 | ||
|
|
7427bc9043 | ||
|
|
8ab104f6b7 | ||
|
|
f15cbb4ca1 | ||
|
|
fa235e97c5 | ||
|
|
d5e315bba8 | ||
|
|
91ad2974ec | ||
|
|
59902566f3 | ||
|
|
411391baa1 | ||
|
|
cadc48b41a | ||
|
|
1396a1ef6c | ||
|
|
0cf5195fc5 | ||
|
|
17e2f90b91 | ||
|
|
a079dd0ff0 | ||
|
|
c4d8972a83 | ||
|
|
b494124a2d | ||
|
|
d8ad2e5721 | ||
|
|
ec7bd14451 | ||
|
|
2097702daa | ||
|
|
dc149eaa01 | ||
|
|
f14b77db05 | ||
|
|
df53fe3971 | ||
|
|
bb57d7e99f | ||
|
|
03034d2f15 | ||
|
|
8fd1495795 | ||
|
|
dba2556e4e | ||
|
|
cdec1c0c19 | ||
|
|
3aa0dd2db6 | ||
|
|
c3829aa435 | ||
|
|
356c1af046 | ||
|
|
6bd4de3af5 | ||
|
|
4040e971f5 | ||
|
|
316b79bf72 | ||
|
|
9eb1fbaf1f | ||
|
|
1cc0c8a0fc | ||
|
|
c59414c5c1 | ||
|
|
008693184e | ||
|
|
55df8b3d87 | ||
|
|
5470245b45 | ||
|
|
95d15555f4 | ||
|
|
3ffcbb32dd | ||
|
|
2fbe2bbe68 | ||
|
|
396d202d9f | ||
|
|
cb6b793f37 | ||
|
|
086552fbe5 | ||
|
|
b028e655d2 | ||
|
|
374fa9ad5b | ||
|
|
7d8f70635c | ||
|
|
4d4d21e2fa | ||
|
|
7f7636e85e | ||
|
|
953e3bf8fc | ||
|
|
8fabf17c21 | ||
|
|
fc14b79a29 | ||
|
|
3fb36477dd | ||
|
|
3311cf479f | ||
|
|
fd8d6bb32a | ||
|
|
7f4cf0fc48 | ||
|
|
d3dd14c87d | ||
|
|
b79014e47f | ||
|
|
98e939d937 | ||
|
|
2611551076 | ||
|
|
4a942dbc02 | ||
|
|
ce65bcc840 | ||
|
|
d276c58d29 | ||
|
|
495c4440fd | ||
|
|
bb472eb8b7 | ||
|
|
0bcd72cb0d |
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:
|
||||
|
||||
19
.github/dependabot.yml
vendored
19
.github/dependabot.yml
vendored
@@ -1,7 +1,24 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
groups:
|
||||
updates:
|
||||
patterns:
|
||||
- "*"
|
||||
update-types:
|
||||
- patch
|
||||
- minor
|
||||
- package-ecosystem: pip
|
||||
directory: "/docs"
|
||||
schedule:
|
||||
interval: weekly
|
||||
groups:
|
||||
patches:
|
||||
patterns:
|
||||
- "*"
|
||||
update-types:
|
||||
- patch
|
||||
- minor
|
||||
|
||||
108
.github/workflows/build-multiarch.yml
vendored
108
.github/workflows/build-multiarch.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Test and Build multi-architecture
|
||||
name: Build and Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -10,6 +10,7 @@ on:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -18,68 +19,62 @@ jobs:
|
||||
matrix:
|
||||
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
|
||||
variant:
|
||||
- java20
|
||||
- java20-alpine
|
||||
- java21-graalvm
|
||||
- java21
|
||||
- java21-alpine
|
||||
- java17
|
||||
- java17-graalvm-ce
|
||||
- java17-graalvm
|
||||
- java17-jdk
|
||||
- java17-openj9
|
||||
- java17-alpine
|
||||
- java8
|
||||
- java8-graalvm-ce
|
||||
- java8-multiarch
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java8-alpine
|
||||
- java11
|
||||
- java11-openj9
|
||||
- java11-jdk
|
||||
include:
|
||||
# JAVA 20:
|
||||
- variant: java20
|
||||
baseImage: eclipse-temurin:20-jre
|
||||
# JAVA 21:
|
||||
- variant: java21-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:21-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.19.3
|
||||
- variant: java20-alpine
|
||||
baseImage: eclipse-temurin:20-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.19.3
|
||||
mcVersion: latest
|
||||
- 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,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:ol8-java17
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:17-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-jdk
|
||||
baseImage: eclipse-temurin:17-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-17-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
mcVersion: 1.20.4
|
||||
# JAVA 11:
|
||||
- variant: java11
|
||||
baseImage: adoptopenjdk:11-jre-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-jdk
|
||||
baseImage: adoptopenjdk:11-jdk-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-11-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-alpine
|
||||
baseImage: openjdk:8-jre-alpine3.9
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
@@ -87,10 +82,6 @@ jobs:
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:java8
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-multiarch
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -100,20 +91,20 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
|
||||
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
||||
MAIN_VARIANT: java17
|
||||
runs-on: ubuntu-20.04
|
||||
MAIN_VARIANT: java21
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.6
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5.5.1
|
||||
with:
|
||||
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
||||
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
||||
@@ -125,27 +116,29 @@ jobs:
|
||||
type=ref,event=tag,enable=${{ matrix.variant == env.MAIN_VARIANT }}
|
||||
# and each variant (including main one) gets the tag with the variant suffix, such as 2023.1.1-java17
|
||||
type=ref,event=tag,suffix=-${{ matrix.variant }}
|
||||
# latest repo tag gets a moving 'stable' image tag applied to the main variant
|
||||
type=match,value=stable,enable=${{ matrix.variant == env.MAIN_VARIANT }},pattern=\d+\.\d+\.\d+
|
||||
# for building test/* branch images
|
||||
type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != 'master' }}
|
||||
#
|
||||
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == 'master' }}
|
||||
type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != github.event.repository.default_branch }}
|
||||
# latest repo tag gets a moving 'stable' image tag applied to the main variant
|
||||
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: |
|
||||
latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == 'master' }}
|
||||
latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == github.event.repository.default_branch }}
|
||||
labels: |
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3.3.0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2.2.0
|
||||
uses: docker/setup-qemu-action@v3.0.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
@@ -163,20 +156,19 @@ jobs:
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
CF_API_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3.1.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3.1.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -184,14 +176,14 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
push: >
|
||||
${{
|
||||
github.ref_type == 'tag'
|
||||
|| github.ref_name == 'master'
|
||||
|| github.ref_name == github.event.repository.default_branch
|
||||
|| startsWith(github.ref_name, 'test/')
|
||||
|| ( github.event_name == 'pull_request'
|
||||
&& env.HAS_IMAGE_REPO_ACCESS
|
||||
|
||||
26
.github/workflows/discord.yml
vendored
26
.github/workflows/discord.yml
vendored
@@ -1,8 +1,11 @@
|
||||
name: Discord notifications
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_run:
|
||||
workflows: ["ContinuousIntegration", "Build and Publish", "Build and publish multiarch" ]
|
||||
workflows: ["Build and Publish"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
@@ -14,13 +17,26 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: on-publish
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
uses: SethCohen/github-releases-to-discord@v1.15.0
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: on-success
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏"
|
||||
args: |
|
||||
Github repo: ${{ github.repository }}
|
||||
- Branch: ${{ github.event.workflow_run.head_branch }}
|
||||
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
||||
- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏
|
||||
- name: on-failure
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
if: github.event.workflow_run.conclusion == 'failure'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥"
|
||||
args: |
|
||||
Github repo: ${{ github.repository }}
|
||||
- Branch: ${{ github.event.workflow_run.head_branch }}
|
||||
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
||||
- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥
|
||||
|
||||
4
.github/workflows/stale-check.yml
vendored
4
.github/workflows/stale-check.yml
vendored
@@ -6,13 +6,13 @@ on:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Process Stale Issues
|
||||
uses: actions/stale@v8
|
||||
uses: actions/stale@v9
|
||||
with:
|
||||
stale-issue-label: status/stale
|
||||
stale-pr-label: status/stale
|
||||
|
||||
40
.github/workflows/verify-pr.yml
vendored
40
.github/workflows/verify-pr.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "docker-compose*.yml"
|
||||
- "mkdocs.yml"
|
||||
|
||||
@@ -16,45 +17,45 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- java20
|
||||
- java21
|
||||
- java21-alpine
|
||||
- java17
|
||||
- java17-alpine
|
||||
- java8-multiarch
|
||||
- java8
|
||||
include:
|
||||
# JAVA 20:
|
||||
- variant: java20
|
||||
baseImage: eclipse-temurin:20-jre
|
||||
# JAVA 21:
|
||||
- variant: java21
|
||||
baseImage: eclipse-temurin:21-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.19.4
|
||||
mcVersion: latest
|
||||
- variant: java21-alpine
|
||||
baseImage: eclipse-temurin:21-jre-alpine
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.19.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.19.4
|
||||
- variant: java8-multiarch
|
||||
mcVersion: 1.20.4
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4.1.6
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3.3.0
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
@@ -64,7 +65,7 @@ jobs:
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
# Only build single platform since loading multi-arch image into daemon fails with
|
||||
# "docker exporter does not currently support exporting manifest lists"
|
||||
@@ -83,8 +84,7 @@ jobs:
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
CF_API_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
DEBUG: ${{ runner.debug }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
version: 2
|
||||
|
||||
build:
|
||||
|
||||
49
Dockerfile
49
Dockerfile
@@ -1,6 +1,6 @@
|
||||
# syntax = docker/dockerfile:1.3
|
||||
|
||||
ARG BASE_IMAGE=eclipse-temurin:17-jre-focal
|
||||
ARG BASE_IMAGE=eclipse-temurin:21-jre
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
@@ -9,45 +9,46 @@ ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
# CI system should set this to a hash or git revision of the build directory and it's contents to
|
||||
# ensure consistent cache updates.
|
||||
ARG BUILD_FILES_REV=1
|
||||
ARG FORCE_INSTALL_PACKAGES=1
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} /build/run.sh setup-user
|
||||
/build/run.sh setup-user
|
||||
|
||||
COPY --chmod=644 files/sudoers* /etc/sudoers.d
|
||||
|
||||
EXPOSE 25565
|
||||
|
||||
ARG EASY_ADD_VER=0.7.1
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
ARG EASY_ADD_VERSION=0.8.5
|
||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
ARG RESTIFY_VERSION=1.7.2
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
--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.6
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.6.1 --var app=rcon-cli --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
--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.11
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.11.0 --var app=mc-monitor --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
--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.12.1
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.8.3 --var app=mc-server-runner --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
--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
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.32.4
|
||||
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||
ARG MC_HELPER_VERSION=1.38.15
|
||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||
# used for cache busting local copy of mc-image-helper
|
||||
ARG MC_HELPER_REV=1
|
||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
@@ -65,9 +66,7 @@ ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000
|
||||
COPY --chmod=755 scripts/start* /
|
||||
COPY --chmod=755 bin/ /usr/local/bin/
|
||||
COPY --chmod=755 bin/mc-health /health.sh
|
||||
COPY --chmod=644 files/log4j2.xml /image/log4j2.xml
|
||||
# By default this file gets retrieved from repo, but bundle in image as potential fallback
|
||||
COPY --chmod=644 files/cf-exclude-include.json /image/cf-exclude-include.json
|
||||
COPY --chmod=644 files/* /image/
|
||||
COPY --chmod=755 files/auto /auto
|
||||
|
||||
RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPatcher/releases/download/v1.0.1/Log4jPatcher-1.0.1.jar
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
. "/start-utils"
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
echo "ERROR: console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
|
||||
fi
|
||||
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "ERROR: pass console commands as arguments"
|
||||
exit 1
|
||||
|
||||
@@ -26,9 +26,14 @@ apk add --no-cache -U \
|
||||
zstd \
|
||||
nfs-utils \
|
||||
libpcap \
|
||||
libwebp
|
||||
libwebp \
|
||||
libcap
|
||||
|
||||
# Patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-alpine-amd64.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64
|
||||
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.14/gosu-amd64
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64
|
||||
chmod +x /bin/gosu
|
||||
else
|
||||
echo "Not supported!"
|
||||
|
||||
@@ -18,13 +18,15 @@ enabled=1
|
||||
EOF
|
||||
dnf update -y
|
||||
|
||||
dnf install -y ImageMagick \
|
||||
dnf install -y \
|
||||
ImageMagick \
|
||||
file \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils \
|
||||
curl \
|
||||
git \
|
||||
git-lfs \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
@@ -36,7 +38,14 @@ dnf install -y ImageMagick \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
libpcap \
|
||||
libwebp
|
||||
libwebp \
|
||||
findutils \
|
||||
which
|
||||
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
|
||||
dnf update -y
|
||||
dnf install -y \
|
||||
git-lfs
|
||||
|
||||
bash /build/ol/install-gosu.sh
|
||||
|
||||
@@ -44,3 +53,7 @@ bash /build/ol/install-gosu.sh
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
|
||||
@@ -29,10 +29,19 @@ apt-get install -y \
|
||||
libpcap0.8 \
|
||||
webp
|
||||
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
git-lfs
|
||||
|
||||
apt-get clean
|
||||
|
||||
# Patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#
|
||||
# and then access http://localhost:8000
|
||||
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mkdocs:
|
||||
build:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
@@ -19,7 +19,9 @@ docker exec mc rcon-cli stop
|
||||
|
||||
_The `-i` is not needed in this case._
|
||||
|
||||
If rcon is disabled you can send commands by passing them as arguments to the packaged `mc-send-to-console` script. For example, a player can be op'ed in the container `mc` with:
|
||||
## When RCON is disabled
|
||||
|
||||
If rcon is disabled you can send commands by passing them as arguments to the packaged `mc-send-to-console` script after setting the env var `CREATE_CONSOLE_IN_PIPE` to "true". For example, a player can be op'ed in the container `mc` with:
|
||||
|
||||
```shell
|
||||
docker exec mc mc-send-to-console op player
|
||||
@@ -27,9 +29,26 @@ docker exec mc mc-send-to-console op player
|
||||
+- container name +- Minecraft commands start here
|
||||
```
|
||||
|
||||
In order to attach and interact with the Minecraft server, add `-it` when starting the container, such as
|
||||
## Enabling interactive console
|
||||
|
||||
In order to attach and interact with the Minecraft server make sure to enable TTY and keep stdin open.
|
||||
|
||||
!!! example
|
||||
|
||||
With `docker run` use the `-it` arguments:
|
||||
|
||||
```shell
|
||||
docker run -d -it -p 25565:25565 --name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
or with a compose file:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
minecraft:
|
||||
stdin_open: true
|
||||
tty: true
|
||||
```
|
||||
|
||||
With that you can attach and interact at any time using
|
||||
|
||||
@@ -37,9 +56,6 @@ With that you can attach and interact at any time using
|
||||
|
||||
and then Control-p Control-q to **detach**.
|
||||
|
||||
For remote access, configure your Docker daemon to use a `tcp` socket (such as `-H tcp://0.0.0.0:2375`)
|
||||
and attach from another machine:
|
||||
!!! info "RCON is required for fully interactive, color console"
|
||||
|
||||
docker -H $HOST:2375 attach mc
|
||||
|
||||
Unless you're on a home/private LAN, you should [enable TLS access](https://docs.docker.com/articles/https/).
|
||||
RCON must be enabled, which is the default, in order to use a fully interactive console with auto-completion and colorized log output.
|
||||
@@ -17,7 +17,7 @@ When the environment variable `REPLACE_ENV_IN_PLACE` is set to `true` (the defau
|
||||
|
||||
Variables that you want to replace need to be declared inside curly brackets and prefixed with a dollar sign, such as `${CFG_YOUR_VARIABLE}`, which is same as many scripting languages.
|
||||
|
||||
You can also change `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_", to limit which environment variables are allowed to be used. For example, with "CFG_" as the prefix, the variable `${CFG_DB_HOST}` would be subsituted, but not `${DB_HOST}`.
|
||||
You can also change `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_", to limit which environment variables are allowed to be used. For example, with "CFG_" as the prefix, the variable `${CFG_DB_HOST}` would be substituted, but not `${DB_HOST}`. The prefix can be set to an empty string to allow for matching any variable name.
|
||||
|
||||
If you want to use a file's content for value, such as when using secrets mounted as files, declare the placeholder named like normal in the file and declare an environment variable named the same but with the suffix `_FILE`.
|
||||
|
||||
@@ -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:
|
||||
@@ -101,11 +100,11 @@ secrets:
|
||||
|
||||
## Patching existing files
|
||||
|
||||
JSON path based patches can be applied to one or more existing files by setting the variable `PATCH_DEFINITIONS` to the path of a directory that contains one or more [patch definition json files](https://github.com/itzg/mc-image-helper#patchdefinition) or a [patch set json file](https://github.com/itzg/mc-image-helper#patchset).
|
||||
JSON path based patches can be applied to one or more existing files by setting the variable `PATCH_DEFINITIONS` to the path of a directory that contains one or more [patch definition json files](https://github.com/itzg/mc-image-helper#patchdefinition) or a [patch set json file](https://github.com/itzg/mc-image-helper#patchset).
|
||||
|
||||
Variable placeholders in the patch values can be restricted by setting `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_".
|
||||
The `file` and `value` fields of the patch definitions may contain `${...}` variable placeholders. The allowed environment variables in placeholders can be restricted by setting `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_".
|
||||
|
||||
The following example shows a patch-set file were various fields in the `paper.yaml` configuration file can be modified and added:
|
||||
The following example shows a patch-set file where various fields in the `paper.yaml` configuration file can be modified and added:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -139,4 +138,8 @@ The following example shows a patch-set file were various fields in the `paper.y
|
||||
}
|
||||
```
|
||||
|
||||
> **NOTES:** Only JSON and Yaml files can be patched at this time. TOML support is planned to be added next. Removal of comments and other cosmetic changes will occur when patched files are processed.
|
||||
Supports the file formats:
|
||||
- JSON
|
||||
- JSON5
|
||||
- Yaml
|
||||
- TOML, but processed output is not pretty
|
||||
|
||||
@@ -8,13 +8,47 @@ By default, the image declares an initial and maximum Java memory-heap limit of
|
||||
- `INIT_MEMORY`: independently sets the initial heap size
|
||||
- `MAX_MEMORY`: independently sets the max heap size
|
||||
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. For example:
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
|
||||
|
||||
-e MEMORY=2G
|
||||
!!! example "Using docker run"
|
||||
|
||||
```
|
||||
-e MEMORY=2G
|
||||
```
|
||||
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 2GB of memory:
|
||||
or to use init and max memory:
|
||||
|
||||
-e MEMORY="" -e JVM_XX_OPTS="-XX:MaxRAMPercentage=75" -m 2000M
|
||||
```
|
||||
-e INIT_MEMORY=1G -e MAX_MEMORY=4G
|
||||
```
|
||||
|
||||
!!! example "Using compose file"
|
||||
|
||||
```
|
||||
environment:
|
||||
MEMORY: 2G
|
||||
```
|
||||
|
||||
or to use init and max memory:
|
||||
|
||||
```
|
||||
environment:
|
||||
INIT_MEMORY: 1G
|
||||
MAX_MEMORY: 4G
|
||||
```
|
||||
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory:
|
||||
|
||||
!!! example "MaxRAMPercentage using compose file"
|
||||
|
||||
```
|
||||
environment:
|
||||
MEMORY: ""
|
||||
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
|
||||
deploy:
|
||||
limits:
|
||||
memory: 4G
|
||||
```
|
||||
|
||||
!!! important
|
||||
The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
|
||||
@@ -62,15 +96,36 @@ you can use
|
||||
|
||||
## Enable Remote JMX for Profiling
|
||||
|
||||
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true`, set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
|
||||
To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
|
||||
|
||||
```
|
||||
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
|
||||
```
|
||||
!!! example
|
||||
|
||||
With `docker run`
|
||||
|
||||
```
|
||||
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
|
||||
```
|
||||
|
||||
If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port.
|
||||
|
||||
!!! example
|
||||
|
||||
With a compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
ENABLE_JMX: true
|
||||
JMX_HOST: ${HOSTNAME}
|
||||
JMX_PORT: "7092"
|
||||
ports:
|
||||
- "7092:7092"
|
||||
```
|
||||
|
||||
## Enable Aikar's Flags
|
||||
|
||||
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using
|
||||
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
|
||||
|
||||
The set of flags documented there can be added using
|
||||
|
||||
-e USE_AIKAR_FLAGS=true
|
||||
|
||||
|
||||
@@ -41,27 +41,19 @@ See [Custom worlds directory path](../misc/world-data.md#custom-worlds-directory
|
||||
|
||||
## Interactive and Color Console
|
||||
|
||||
If you would like to `docker attach` to the Minecraft server console with color and interactive capabilities, then add
|
||||
When RCON is enabled, which is the default, and [TTY](https://docs.docker.com/compose/compose-file/05-services/#tty) is enabled on the container, then some server types will output colorized logs and provide a fully interactive console. To access the interactive console, use [`docker attach`](https://docs.docker.com/engine/reference/commandline/container_attach/) (not `exec`). When finished, make sure to use the sequence Control-P, Control-Q to detach without stopping the container.
|
||||
|
||||
```
|
||||
-e EXEC_DIRECTLY=true
|
||||
```
|
||||
|
||||
> **NOTES**
|
||||
>
|
||||
> This feature doesn't work via rcon, so you will need to `docker attach` to the container. Use the sequence Ctrl-P, Ctrl-Q to detach.
|
||||
>
|
||||
> This will bypass graceful server shutdown handling when using `docker stop`, so be sure the server console's `stop` command.
|
||||
>
|
||||
> Make to enable stdin and tty with `-it` when using `docker run` or `stdin_open: true` and `tty: true` when using docker compose.
|
||||
>
|
||||
> This feature is incompatible with Autopause and cannot be set when `ENABLE_AUTOPAUSE=true`.
|
||||
If this behavior interferes with the log content, then disable TTY or remove the setting entirely since the default is disabled. In a compose file, set the service's `tty` parameter to `false`. On the `docker run` command-line remove the `-t` argument.
|
||||
|
||||
## Server Shutdown Options
|
||||
|
||||
To allow time for players to finish what they're doing during a graceful server shutdown, set `STOP_SERVER_ANNOUNCE_DELAY` to a number of seconds to delay after an announcement is posted by the server.
|
||||
|
||||
> **NOTE** be sure to adjust Docker's shutdown timeout accordingly, such as using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/).
|
||||
!!! warning "Increase stop grace period"
|
||||
|
||||
The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed.
|
||||
|
||||
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.
|
||||
|
||||
## OpenJ9 Specific Options
|
||||
|
||||
|
||||
@@ -1,32 +1,92 @@
|
||||
By default, the server configuration will be created and set based on the following environment variables, but only the first time the server is started. If the `server.properties` file already exists, the values in them will not be changed.
|
||||
In order to unify management of the Minecraft server container, all of the [`server.properties`](https://minecraft.wiki/w/Server.properties) entries can be managed by the environment variables described in the sections below. Some of the mappings provide additional functionality above and beyond the properties file.
|
||||
|
||||
If you prefer to manually manage the `server.properties` file, set `OVERRIDE_SERVER_PROPERTIES` to "false". Similarly, you can entirely skip the startup script's creation of `server.properties` by setting `SKIP_SERVER_PROPERTIES` to "true".
|
||||
|
||||
> NOTE: to clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. A variables that maps to a server property that is unset, is ignored and the existing `server.property` is left unchanged.
|
||||
!!! 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 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
|
||||
|
||||
When declaring a server properties via container environment variables, those values may contain placeholders that are processed when the `server.properties` file is updated.
|
||||
|
||||
The syntax of placeholders is DOS-style, `%VAR%`, to avoid being processed by Docker or the shell and the following options are available:
|
||||
|
||||
`%VAR%` or `%env:VAR%`
|
||||
|
||||
: Replaced with the resolved value or the environment variable `VAR`
|
||||
|
||||
`%date:FMT%`
|
||||
|
||||
: Formats the current date/time with the given `FMT` string processed by [Java's DateTimeFormatter](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html).
|
||||
|
||||
Any declared or resolved environment variable may be referenced, such as `VERSION` and `TYPE`. Additionally, [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md) and [Auto CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md) modpacks will expose the environment variables `MODPACK_NAME` and `MODPACK_VERSION`. The originally declared version, such as "LATEST" or "SNAPSHOT", is available in the variable `DECLARED_VERSION`
|
||||
|
||||
!!! example
|
||||
|
||||
As a compose file environment entry:
|
||||
|
||||
```yaml
|
||||
MOTD: Running %MODPACK_NAME% version %env:MODPACK_VERSION%
|
||||
LEVEL: world-%date:yyyy-MM-dd%
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
Placeholders are not supported when manually managing `server.properties`
|
||||
|
||||
## Properties
|
||||
|
||||
### Message of the Day
|
||||
|
||||
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as
|
||||
|
||||
-e MOTD="My Server"
|
||||
|
||||
If you leave it off, a default is computed from the server type and version, such as
|
||||
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable or a default is computed from the server type and version, such as
|
||||
|
||||
A Paper Minecraft Server powered by Docker
|
||||
|
||||
That way you can easily differentiate between several servers you may have started.
|
||||
That way you can easily differentiate between several server types you may have started.
|
||||
|
||||
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.fandom.com/wiki/Formatting_codes) to be used consistently with all server versions. For example,
|
||||
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.wiki/w/Formatting_codes) to be used consistently with all server versions. For Minecraft versions less than 1.20, unicode characters in `server.properties` will be escaped as `\uXXXX`, by default. That behavior can be altered by setting `SERVER_PROPERTIES_ESCAPE_UNICODE` to "true" or "false".
|
||||
|
||||
-e MOTD="A §l§cMinecraft§r §nserver"
|
||||
!!! example
|
||||
|
||||
renders
|
||||
With `docker run`
|
||||
|
||||
-e MOTD="A §l§cMinecraft§r §nserver"
|
||||
|
||||
or within a compose file
|
||||
|
||||
environment:
|
||||
MOTD: "A §l§cMinecraft§r §nserver"
|
||||
|
||||

|
||||
renders
|
||||
|
||||

|
||||
|
||||
To produce a multi-line MOTD, you will need to double escape the newline such as
|
||||
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as the following example.
|
||||
|
||||
-e MOTD="Line one\\nLine two"
|
||||
!!! 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
|
||||
|
||||
You can also embed configured and resolved environment variables using [placeholders](#placeholders).
|
||||
|
||||
### Difficulty
|
||||
|
||||
@@ -40,49 +100,92 @@ Valid values are: `peaceful`, `easy`, `normal`, and `hard`, and an
|
||||
error message will be output in the logs if it's not one of these
|
||||
values.
|
||||
|
||||
Refer to [the Minecraft wiki](https://minecraft.wiki/w/Difficulty)
|
||||
|
||||
### Whitelist Players
|
||||
|
||||
!!! note
|
||||
!!! warning "For public servers"
|
||||
|
||||
It is very important to set this with servers exposed to the internet where you want only limited players to join.
|
||||
It is very important to consider setting a whitelist of expected players.
|
||||
|
||||
To whitelist players for your Minecraft server, you can:
|
||||
|
||||
- Provide a list of usernames and/or UUIDs separated by commas via the `WHITELIST` environment variable
|
||||
`docker run -d -e WHITELIST=user1,uuid2 ...`
|
||||
- Provide the url or path to a whitelist file via `WHITELIST_FILE` environment variable
|
||||
`docker run -d -e WHITELIST_FILE=/extra/whitelist.json ...`
|
||||
- Provide a list of usernames and/or UUIDs separated by commas or newlines via the `WHITELIST` environment variable
|
||||
- Provide the URL or container path to a whitelist file via `WHITELIST_FILE` that will be retrieved/copied into the standard location
|
||||
|
||||
When either is set, [whitelisting of connecting users](https://minecraft.fandom.com/wiki/Server.properties#white-list) is enabled . If managing the list manually, `ENABLE_WHITELIST` can be set to "true" to set the `white-list` property.
|
||||
!!! example
|
||||
|
||||
If whitelist configuration already exists, `WHITELIST_FILE` will not be retrieved and any usernames in `WHITELIST` are **added** to the whitelist configuration. You can enforce regeneration of the whitelist on each server startup by setting `OVERRIDE_WHITELIST` to "true". This will delete the whitelist file before processing whitelist configuration.
|
||||
In a compose file, a text block can be used to improve maintainability, such as
|
||||
|
||||
!!! note
|
||||
```yaml
|
||||
WHITELIST: |
|
||||
user1
|
||||
user2
|
||||
user3
|
||||
```
|
||||
|
||||
You can provide both `WHITELIST_FILE` and `WHITELIST`, which are processed in that order.
|
||||
When either is set, [whitelisting of connecting users](https://minecraft.wiki/w/Server.properties#white-list) is enabled.
|
||||
|
||||
To change the behavior when the whitelist file already exists, set the variable `EXISTING_WHITELIST_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
: Skip processing of the whitelist file when one is already present. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
: Synchronize the list of users in the file with the `WHITELIST` or `WHITELIST_FILE` provided. When using both, `WHITELIST` will take precedence. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "true".
|
||||
|
||||
`MERGE`
|
||||
: Merge the list of users from `WHITELIST` into the existing file. `WHITELIST_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
: When `WHITELIST_FILE` is provided it will overwrite an existing whitelist file. Also, if `WHITELIST` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
|
||||
UUIDs passed via `WHITELIST` need to be the dashed variant, otherwise it not be recognised and instead added as a username.
|
||||
|
||||
If running Minecraft 1.7.5 or earlier, these variables will apply to `white-list.txt`, with 1.7.6 implementing support for `whitelist.json`. Make sure your `WHITELIST_FILE` is in the appropriate format.
|
||||
|
||||
To [enforce the whitelist changes immediately](https://minecraft.fandom.com/wiki/Server.properties#enforce-whitelist) when whitelist commands are used , set `ENFORCE_WHITELIST` to "true".
|
||||
For versions prior to 1.7.3, `white-list.txt` will be maintained instead. Only usernames are supported for those versions.
|
||||
|
||||
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, to add users as operators (aka adminstrators) to your Minecraft server, you can:
|
||||
Similar to the whitelist, users can be provisioned as operators (aka administrators) to your Minecraft server by
|
||||
|
||||
- Provide te url or path to an ops file via `OPS_FILE` environment variable
|
||||
`docker run -d -e OPS_FILE=https://config.example.com/extra/ops.json ...`
|
||||
- Provide a list of usernames and/or UUIDs separated by commas via the `OPS` environment variable
|
||||
`docker run -d -e OPS=user1,uuid2 ...`
|
||||
- Providing a list of usernames and/or UUIDs separated by commas or newlines via the `OPS` environment variable
|
||||
- Providing the URL or container path to an ops file via `OPS_FILE` that will be retrieved/copied into the standard location
|
||||
|
||||
If ops configuration already exists, `OPS_FILE` will not be retrieved and any usernames in `OPS` are **added** to the ops configuration. You can enforce regeneration of the ops configuration on each server startup by setting `OVERRIDE_OPS` to "true". This will delete the ops file before processing ops configuration.
|
||||
!!! example
|
||||
|
||||
!!! note
|
||||
In a compose file, a text block can be used to improve maintainability, such as
|
||||
|
||||
Similar to whitelists, you can provide both `OPS_FILE` and `OPS`, and Minecraft 1.7.5 or earlier will use `ops.txt` rather than `ops.json`.
|
||||
```yaml
|
||||
OPS: |
|
||||
user1
|
||||
user2
|
||||
user3
|
||||
```
|
||||
|
||||
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 processing of the ops file when one is already present. This is the same as setting the legacy variable `OVERRIDE_OPS` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
: Synchronize the list of users in the file with the `OPS` or `OPS_FILE` provided. When using both, `OPS` will take precedence. The `level` and `bypassesPlayerLimit` will be retained from previous entries. This is the same as setting the legacy variable `OVERRIDE_OPS` to "true".
|
||||
|
||||
`MERGE`
|
||||
: Merge the list of users from `OPS` into the existing file. `OPS_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
: When `OPS_FILE` is provided it will overwrite an existing ops file. Also, if `OPS` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
|
||||
For versions prior to 1.7.3, `ops.txt` will be maintained instead. Only usernames are supported for those versions.
|
||||
|
||||
### Enable/disable initial selection of datapacks
|
||||
|
||||
@@ -107,9 +210,13 @@ The server icon which has been set doesn't get overridden by default. It can be
|
||||
|
||||
RCON is **enabled by default** to allow for graceful shut down the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
|
||||
|
||||
The default password is randomly generated if `RCON_PASSWORD` has not been set.
|
||||
!!! warning
|
||||
|
||||
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
|
||||
Disabling RCON will remove and limit some features, such as interactive and color console support.
|
||||
|
||||
The default password is randomly generated on each startup; however, a specific one can be set with `RCON_PASSWORD`.
|
||||
|
||||
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you are aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
|
||||
|
||||
!!! info
|
||||
|
||||
@@ -243,7 +350,7 @@ If using a negative value for the seed, make sure to quote the value such as:
|
||||
|
||||
By default, Minecraft servers are configured to run in Survival mode. You can
|
||||
change the mode using `MODE` where you can either provide the [standard
|
||||
numerical values](http://minecraft.gamepedia.com/Game_mode#Game_modes) or the
|
||||
numerical values](http://minecraft.wiki/Game_mode#Game_modes) or the
|
||||
shortcut values:
|
||||
|
||||
- creative
|
||||
@@ -265,9 +372,45 @@ environment variable set to `false`, such as
|
||||
### Level Type and Generator Settings
|
||||
|
||||
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
|
||||
be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.fandom.com/wiki/Server.properties#level-type).
|
||||
be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.wiki/w/Server.properties#level-type).
|
||||
|
||||
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation [as described here](https://minecraft.fandom.com/wiki/Server.properties#generator-settings).
|
||||
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation.
|
||||
|
||||
To configure the `GENERATOR_SEETINGS` you need to add the appropriate `GeneratorOptions` JSON configuration. In the case of a superflat world, you may omit the `flat_world_options`.
|
||||
|
||||
The layers are applied from -64 and up and are added in the order of the list
|
||||
|
||||
Example for a superflat world:
|
||||
|
||||
- 1x bedrock
|
||||
- 2x stone
|
||||
- 15x sandstone
|
||||
- Desert biome
|
||||
|
||||
```yaml
|
||||
LEVEL_TYPE: FLAT
|
||||
GENERATOR_SETTINGS: >-4
|
||||
{
|
||||
"layers": [
|
||||
{
|
||||
"block": "minecraft:bedrock",
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"block": "minecraft:stone",
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"block": "minecraft:sandstone",
|
||||
"height": 15
|
||||
}
|
||||
],
|
||||
"biome": "minecraft:desert"
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
For more details, check the [official wiki](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format).
|
||||
|
||||
### Custom Server Resource Pack
|
||||
|
||||
@@ -317,10 +460,28 @@ If you must, the server port can be set like:
|
||||
|
||||
**however**, be sure to change your port mapping accordingly and be prepared for some features to break.
|
||||
|
||||
### Custom server properties
|
||||
|
||||
Some mods/plugins utilize custom `server.properties` entries which can be declared via the `CUSTOM_SERVER_PROPERTIES` environment variable. The contents must be newline delimited `name=value` pairs.
|
||||
|
||||
Within a compose file, newline delimited entries can be declared as shown here:
|
||||
|
||||
```yaml
|
||||
CUSTOM_SERVER_PROPERTIES: |
|
||||
custom1=value1
|
||||
defaultworldgenerator-port=f8c04631-f744-11ec-b260-f02f74b094e0
|
||||
```
|
||||
|
||||
When using `docker run` from a bash shell, the entries must be quoted with the `$'` syntax, such as
|
||||
|
||||
```
|
||||
-e CUSTOM_SERVER_PROPERTIES=$'k1=v1\nk2=v2'
|
||||
```
|
||||
|
||||
### Other server property mappings
|
||||
|
||||
| Environment Variable | Server Property |
|
||||
| --------------------------------- | --------------------------------- |
|
||||
|-----------------------------------|-----------------------------------|
|
||||
| BROADCAST_CONSOLE_TO_OPS | broadcast-console-to-ops |
|
||||
| BROADCAST_RCON_TO_OPS | broadcast-rcon-to-ops |
|
||||
| ENABLE_STATUS | enable-status |
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -14,6 +14,8 @@ The utility used to wake the server (`knock(d)`) works at network interface leve
|
||||
|
||||
A file called `.paused` is created in `/data` directory when the server is paused and removed when the server is resumed. Other services may check for this file's existence before waking the server.
|
||||
|
||||
A `.skip-pause` file can be created in the `/data` directory to make the server skip autopausing, for as long as the file is present. The autopause timer will also be reset.
|
||||
|
||||
A starting, example compose file has been provided in [examples/docker-compose-autopause.yml](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-autopause.yml).
|
||||
|
||||
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
|
||||
@@ -43,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:
|
||||
|
||||
@@ -52,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
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ An option to stop the server after a specified time has been added for niche app
|
||||
|
||||
the docker container variables have to be set accordingly (restart policy set to "no") and that the container has to be manually restarted.
|
||||
|
||||
A `.skip-stop` file can be created in the `/data` directory to make the server skip autostopping, for as long as the file is present. The autostop timer will also be reset.
|
||||
|
||||
A starting, example compose file has been provided in [examples/docker-compose-autostop.yml](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-autostop.yml).
|
||||
|
||||
Enable the Autostop functionality by setting:
|
||||
|
||||
@@ -17,7 +17,6 @@ First, build a baseline of the image to include the packages needed by existing
|
||||
|
||||
PowerShell: (Example of building and testing ForgeAPI)
|
||||
```powershell
|
||||
$env:MODS_FORGEAPI_KEY='$2a$...'
|
||||
$env:FOLDER_TO_TEST="forgeapimods_projectids"
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $env:IMAGE_TO_TEST .
|
||||
@@ -36,7 +35,6 @@ docker build --build-arg BASE_IMAGE=$env:BASE_IMAGE -t $env:IMAGE_TO_TEST .
|
||||
|
||||
Bash: (Example of building and testing ForgeAPI)
|
||||
```bash
|
||||
export MODS_FORGEAPI_KEY='$2a$...'
|
||||
export FOLDER_TO_TEST="forgeapimods_file"
|
||||
export IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $IMAGE_TO_TEST .
|
||||
@@ -48,49 +46,59 @@ popd
|
||||
|
||||
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
|
||||
|
||||
```shell script
|
||||
```shell
|
||||
docker run -it --rm -v ${PWD}:/scripts -e SCRIPTS=/scripts/ --entrypoint bash mc-dev
|
||||
```
|
||||
|
||||
From within the container you can run individual scripts via the attached `/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
|
||||
|
||||
```shell script
|
||||
```shell
|
||||
export VERSION=1.12.2
|
||||
/scripts/start-magma
|
||||
```
|
||||
|
||||
...or pre-pending script execution:
|
||||
|
||||
```shell script
|
||||
```shell
|
||||
VERSION=1.12.2 /scripts/start-magma
|
||||
```
|
||||
|
||||
> NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
|
||||
!!! note
|
||||
|
||||
## Using development copy of mc-image-helper
|
||||
You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
|
||||
|
||||
In the cloned copy of [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
|
||||
## Using development copy of tools
|
||||
|
||||
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
|
||||
|
||||
```shell
|
||||
./gradlew distTar
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
The distribution's version will be `0.0.0-<branch>-SNAPSHOT`
|
||||
|
||||
Assuming Java 18 or newer:
|
||||
For Go base tools, run
|
||||
|
||||
```shell
|
||||
cd build/distributions
|
||||
jwebserver -b 0.0.0.0 -p 8008
|
||||
goreleaser release --snapshot --clean
|
||||
```
|
||||
|
||||
Clone [itzg/github-releases-proxy](https://github.com/itzg/github-releases-proxy) and run it according to the instructions shown there.
|
||||
|
||||
In the Docker build, configure the following
|
||||
|
||||
```shell
|
||||
--build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT \
|
||||
--build-arg MC_HELPER_BASE_URL=http://host.docker.internal:8008
|
||||
--build-arg GITHUB_BASEURL=http://host.docker.internal:8080 \
|
||||
--build-arg APPS_REV=1
|
||||
```
|
||||
|
||||
Now the image can be built like normal, and it will install mc-image-helper from the locally built copy.
|
||||
and declare one or more version overrides, such as
|
||||
|
||||
```
|
||||
--build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT
|
||||
```
|
||||
|
||||
## Generating release notes
|
||||
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
# More Deployment Info
|
||||
|
||||
## Using Helm
|
||||
## On Kubernetes
|
||||
|
||||
### Using Helm
|
||||
|
||||
- itzg Helm Chart:
|
||||
- [GitHub repo](https://github.com/itzg/minecraft-server-charts)
|
||||
- [Helm Chart repo](https://itzg.github.io/minecraft-server-charts/)
|
||||
- [mcsh/server-deployment](https://github.com/mcserverhosting-net/charts)
|
||||
|
||||
### Using Shulker
|
||||
|
||||
[Shulker](https://github.com/jeremylvln/Shulker) is a Kubernetes operator for managing complex and dynamic Minecraft infrastructures, including game servers and proxies. It uses the docker-minecraft-server and docker-bungeecord images under-the-hood.
|
||||
|
||||
## On CloudFormation (AWS)
|
||||
|
||||
If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Minecraft Server Deployment (CloudFormation) repository](https://github.com/vatertime/minecraft-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use.
|
||||
|
||||
## Supporting Articles
|
||||
|
||||
Below are supporting articles for server deployment.
|
||||
@@ -16,7 +26,3 @@ Below are supporting articles for server deployment.
|
||||
https://dev.to/rela-v/zero-to-minecraft-server-with-docker-desktop-and-compose-500a
|
||||
|
||||
- This is a reference guide/tutorial on how to set up a vanilla Minecraft server using this project, including step-by-step instructions, and information on topics such as port-forwarding.
|
||||
|
||||
## Deploying onto AWS
|
||||
|
||||
If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Minecraft Server Deployment (CloudFormation) repository](https://github.com/vatertime/minecraft-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use.
|
||||
|
||||
68
docs/misc/examples.md
Normal file
68
docs/misc/examples.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Examples
|
||||
|
||||
Various examples are [maintained in the repository](https://github.com/itzg/docker-minecraft-server/tree/master/examples). The sections below highlight a few particular ones.
|
||||
|
||||
## Bedrock compatible server
|
||||
|
||||
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
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
PLUGINS: |
|
||||
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
|
||||
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
|
||||
ports:
|
||||
- "25565:25565"
|
||||
- "19132:19132/udp"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
```
|
||||
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/geyser/docker-compose.yml)
|
||||
|
||||
## 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
|
||||
services:
|
||||
lazytainer:
|
||||
image: ghcr.io/vmorganp/lazytainer:master
|
||||
environment:
|
||||
VERBOSE: false
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
labels:
|
||||
- lazytainer.group.minecraft.sleepMethod=stop
|
||||
- lazytainer.group.minecraft.ports=25565
|
||||
- lazytainer.group.minecraft.minPacketThreshold=2 # Start after two incomming packets
|
||||
- lazytainer.group.minecraft.inactiveTimeout=600 # 10 minutes, to allow the server to bootstrap. You can probably make this lower later if you want.
|
||||
restart: unless-stopped
|
||||
network_mode: bridge
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: TRUE
|
||||
TYPE: PAPER
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- ./data:/data
|
||||
labels:
|
||||
- lazytainer.group=minecraft
|
||||
depends_on:
|
||||
- lazytainer
|
||||
network_mode: service:lazytainer
|
||||
tty: true
|
||||
stdin_open: true
|
||||
restart: unless-stopped
|
||||
```
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
|
||||
@@ -25,3 +25,8 @@ healthcheck:
|
||||
```
|
||||
|
||||
Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`.
|
||||
|
||||
### Healthchecks for older versions
|
||||
|
||||
This container disables Healthchecks for Versions before b1.8 as those versions do not support any kind of server pinging.
|
||||
For more information see [Server List Ping](https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3)
|
||||
|
||||
49
docs/mods-and-plugins/curseforge-files.md
Normal file
49
docs/mods-and-plugins/curseforge-files.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Auto-download from CurseForge
|
||||
|
||||
Mods and plugins can be auto-downloaded and upgraded from CurseForge by setting `CURSEFORGE_FILES` to a comma or space delimited list of [project-file references](#project-file-references). References removed from the declaration are automatically cleaned up and setting `CURSEFORGE_FILES` to an empty string removes all previously managed project-files.
|
||||
|
||||
A specific file can be omitted from each reference to allow for auto-selecting the newest version of the selected mod/plugin. The resolved `VERSION` and `TYPE` will be taken into consideration for selecting the appropriate file.
|
||||
|
||||
!!! warning "CurseForge API key usage"
|
||||
|
||||
A CurseForge API key must be allocated and set with `CF_API_KEY` [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
|
||||
|
||||
## Project-file references
|
||||
|
||||
!!! tip
|
||||
|
||||
Individual project files typically represent a version of the mod/plugin, but CurseForge refers to these items broadly as "files" rather than "versions".
|
||||
|
||||
The following formats are supported in the list of project-file references:
|
||||
|
||||
- A project page URL, such as `https://www.curseforge.com/minecraft/mc-mods/jei`. _The newest applicable file will be automatically selected._
|
||||
- A file page URL, such as `https://www.curseforge.com/minecraft/mc-mods/jei/files/4593548`
|
||||
- Project slug, such as `jei`. _The newest applicable file will be automatically selected._
|
||||
- Project ID, such as `238222`. _The newest applicable file will be automatically selected._
|
||||
- Project slug or ID, `:`, and a file ID, such as `jei:4593548` or `238222:4593548`
|
||||
- Project slug or ID, `@`, and a partial filename, such as `jei@10.2.1.1005`. This option is useful to refer to a version of the mod/plugin rather than looking up the file ID.
|
||||
|
||||
An `@` followed by the container path to a listing file can also be provided as a project-file reference. Each line is processed as a reference where blank lines and comments that start with `#` are ignored.
|
||||
|
||||
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt" where the container file `/extras/cf-mods.txt` contains
|
||||
|
||||
```text
|
||||
# This comment is ignored
|
||||
jei:10.2.1.1005
|
||||
|
||||
# This and previous blank line are ignore
|
||||
geckolib
|
||||
aquaculture
|
||||
naturalist
|
||||
```
|
||||
|
||||
!!! tip "Docker Compose"
|
||||
|
||||
Making use of the space delimited option, compose file declarations can be organized nicely with a [multi-line string](https://yaml-multiline.info/), such as
|
||||
|
||||
```yaml
|
||||
CURSEFORGE_FILES: |
|
||||
geckolib
|
||||
aquaculture
|
||||
naturalist
|
||||
```
|
||||
@@ -1,65 +0,0 @@
|
||||
# Forge API
|
||||
|
||||
## ForgeAPI usage to use non-version specific projects
|
||||
|
||||
!!! warning "Deprecated"
|
||||
This approach will soon be deprecated in favor of a variation of `AUTO_CURSEFORGE`.
|
||||
|
||||
!!! warning
|
||||
This potentially could lead to unexpected behavior if the Mod receives an update with unexpected behavior.
|
||||
|
||||
This is more complicated because you will be pulling/using the latest mod for the release of your game. To get started make sure you have a [CursedForge API Key](https://docs.curseforge.com/#getting-started). Then use the environmental parameters in your docker build.
|
||||
|
||||
Please be aware of the following when using these options for your mods:
|
||||
* Mod Release types: Release, Beta, and Alpha.
|
||||
* Mod dependencies: Required and Optional
|
||||
* Mod family: Fabric, Forge, and Bukkit.
|
||||
|
||||
Parameters to use the ForgeAPI:
|
||||
|
||||
* `MODS_FORGEAPI_KEY` - Required
|
||||
* `MODS_FORGEAPI_FILE` - Required or use MODS_FORGEAPI_PROJECTIDS (Overrides MODS_FORGEAPI_PROJECTIDS)
|
||||
* `MODS_FORGEAPI_PROJECTIDS` - Required or use MODS_FORGEAPI_FILE
|
||||
* `MODS_FORGEAPI_RELEASES` - Default is release, Options: [Release|Beta|Alpha]
|
||||
* `MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES` - Default is False, attempts to download required mods (releaseType Release) defined in Forge.
|
||||
* `MODS_FORGEAPI_IGNORE_GAMETYPE` - Default is False, Allows for filtering mods on family type: FORGE, FABRIC, and BUKKIT. (Does not filter for Vanilla or custom)
|
||||
* `REMOVE_OLD_FORGEAPI_MODS` - Default is False
|
||||
* `REMOVE_OLD_DATAPACKS_DEPTH` - Default is 1
|
||||
* `REMOVE_OLD_DATAPACKS_INCLUDE` - Default is *.jar
|
||||
|
||||
Example of expected forge api project ids, releases, and key:
|
||||
|
||||
```yaml
|
||||
MODS_FORGEAPI_PROJECTIDS: 306612,256717
|
||||
MODS_FORGEAPI_RELEASES: Release
|
||||
MODS_FORGEAPI_KEY: $WRX...
|
||||
```
|
||||
|
||||
Example of expected ForgeAPI file format.
|
||||
|
||||
**Field Description**:
|
||||
* `name` is currently unused, but can be used to document each entry.
|
||||
* `projectId` id is the id found on the CurseForge website for a particular mod
|
||||
* `releaseType` Type corresponds to forge's R, B, A icon for each file. Default Release, options are (release|beta|alpha).
|
||||
* `fileName` is used for version pinning if latest file will not work for you.
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "fabric api",
|
||||
"projectId": "306612",
|
||||
"releaseType": "release"
|
||||
},
|
||||
{
|
||||
"name": "fabric voice mod",
|
||||
"projectId": "416089",
|
||||
"releaseType": "beta"
|
||||
},
|
||||
{
|
||||
"name": "Biomes o plenty",
|
||||
"projectId": "220318",
|
||||
"fileName": "BiomesOPlenty-1.18.1-15.0.0.100-universal.jar",
|
||||
"releaseType": "release"
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -47,16 +47,14 @@ These paths work well if you want to have a common set of modules in a separate
|
||||
|
||||
## Zip file modpack
|
||||
|
||||
Like the `WORLD` option above, you can specify the URL or path of a "mod pack"
|
||||
to download and install into `mods` for Forge/Fabric or `plugins` for Bukkit/Spigot.
|
||||
To use this option pass the environment variable `MODPACK`, such as
|
||||
Like the `WORLD` option above, you can specify the URL or container path of a "mod pack" to download and install into `mods` for Forge/Fabric or `plugins` for Bukkit/Spigot. To use this option pass the environment variable `MODPACK`, such as
|
||||
|
||||
```shell
|
||||
docker run -d -e MODPACK=http://www.example.com/mods/modpack.zip ...
|
||||
```
|
||||
|
||||
!!! note
|
||||
The referenced URL must be a zip file with one or more jar files at the
|
||||
The referenced URL/file must be a zip file with one or more jar files at the
|
||||
top level of the zip archive. Make sure the jars are compatible with the
|
||||
particular `TYPE` of server you are running.
|
||||
|
||||
@@ -78,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
|
||||
|
||||
|
||||
@@ -2,17 +2,29 @@
|
||||
|
||||
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric and Forge mods](https://modrinth.com/mods). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
|
||||
|
||||
- **MODRINTH_PROJECTS** : comma separated list of project slugs (short name) or IDs. The project ID can be located in the "Technical information" section. The slug is the part of the page URL that follows `/mod/`:
|
||||
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The slug is the part of the page URL that follows `/mod/`:
|
||||
```
|
||||
https://modrinth.com/mod/fabric-api
|
||||
----------
|
||||
|
|
||||
+-- project slug
|
||||
```
|
||||
Also, specific version/type can be declared using colon symbol and version id/type after the project slug. The version id can be found at 'Metadata' section. Valid version types are `release`, `beta`, `alpha`. For instance:
|
||||
```
|
||||
-e MODRINTH_PROJECTS=fabric-api,fabric-api:PbVeub96,fabric-api:beta
|
||||
```
|
||||
- **MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES**=true : required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true`
|
||||
- **MODRINTH_ALLOWED_VERSION_TYPE**=release : the version type is used to determine the newest version to use from each project. The allowed values are `release`, `beta`, `alpha`.
|
||||
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
|
||||
|
||||
| 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` |
|
||||
|
||||
## Extra options
|
||||
|
||||
`MODRINTH_DOWNLOAD_DEPENDENCIES`
|
||||
: 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`.
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
mkdocs
|
||||
mkdocs-material-extensions
|
||||
mkdocs-material
|
||||
mkdocs-autorefs
|
||||
mkdocstrings
|
||||
mkdocs-literate-nav
|
||||
mdx-gh-links
|
||||
mkdocs-click
|
||||
mkdocs-static-i18n
|
||||
mkdocs-material == 9.5.24
|
||||
mkdocs-autorefs == 1.0.1
|
||||
mkdocstrings == 0.25.1
|
||||
mkdocs-literate-nav == 0.6.1
|
||||
mdx-gh-links == 0.4
|
||||
mkdocs-click == 0.8.1
|
||||
mkdocs-static-i18n == 1.2.3
|
||||
@@ -8,7 +8,7 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
|
||||
|
||||
A CurseForge API key is **required** to use this feature. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
|
||||
|
||||
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`.
|
||||
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`. Refer to [this compose file reference section](https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution) for more information.
|
||||
|
||||
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
|
||||
```yaml
|
||||
@@ -56,10 +56,6 @@ For example:
|
||||
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
|
||||
```
|
||||
|
||||
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
|
||||
|
||||
If the authors of the modpack have disallowed project distribution, then the desired **client** modpack zip will need to be manually downloaded and made available to the container. The path to that file must be passed to `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, the modpack slug or page URL must still be provided.
|
||||
|
||||
The latest file will be located and used by default, but if a specific version is desired you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup.
|
||||
|
||||
- Use `CF_PAGE_URL`, but include the full URL to a specific file
|
||||
@@ -72,19 +68,97 @@ The following shows where to get the URL to the specific file and also shows whe
|
||||
|
||||
The following examples all refer to version 1.0.7 of ATM8:
|
||||
|
||||
```
|
||||
-e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390
|
||||
```yaml
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390
|
||||
```
|
||||
|
||||
```
|
||||
-e CF_SLUG=all-the-mods-8 -e CF_FILE_ID=4248390
|
||||
```yaml
|
||||
CF_SLUG: all-the-mods-8
|
||||
CF_FILE_ID: "4248390"
|
||||
```
|
||||
|
||||
```
|
||||
-e CF_SLUG=all-the-mods-8 -e CF_FILENAME_MATCHER=1.0.7
|
||||
```yaml
|
||||
CF_SLUG: all-the-mods-8
|
||||
CF_FILENAME_MATCHER: 1.0.7
|
||||
```
|
||||
|
||||
## Exlude client mods
|
||||
## Manual Downloads
|
||||
|
||||
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
|
||||
|
||||
!!! warning "Download using a browser"
|
||||
|
||||
It's important to use a browser to download the files listed for manual download. If your Docker host is running without a graphical interface, then you can use `scp` or similar to transfer the files to it.
|
||||
|
||||
!!! example
|
||||
|
||||
Assuming Docker compose is being used:
|
||||
|
||||
1. Create a directory next to the `docker-compose.yml` file. The name doesn't matter, but "downloads" is the common convention
|
||||
2. From the "Mods Need Download" output, visit the download page of each, click on the file download and save that file into the directory created in the previous step
|
||||
3. Add a host directory mount to the volumes section where the container path **must be** `/downloads`. The snippet below shows how that will look
|
||||
4. Re-run `docker compose up -d` to apply the changes
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
./downloads:/downloads
|
||||
```
|
||||
|
||||
## Unpublished Modpacks
|
||||
|
||||
If you wish to use an unpublished modpack zip, set the container path to the file in `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, **the modpack slug or page URL must still be provided**.
|
||||
|
||||
!!! example
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
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_MODPACK_MANIFEST: /manifests/manifest.json
|
||||
CF_SLUG: "custom"
|
||||
volumes:
|
||||
- ./manifests:/manifests:ro
|
||||
```
|
||||
|
||||
where an exported manifest file should look like:
|
||||
|
||||
```json
|
||||
{
|
||||
"minecraft": {
|
||||
"version": "1.20.4",
|
||||
"modLoaders": [
|
||||
{
|
||||
"id": "fabric-0.15.3",
|
||||
"primary": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"manifestType": "minecraftModpack",
|
||||
"manifestVersion": 1,
|
||||
"name": "Custom",
|
||||
"author": "",
|
||||
"files": [
|
||||
{
|
||||
"projectID": 351725,
|
||||
"fileID": 4973035,
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"projectID": 306612,
|
||||
"fileID": 5010374,
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"overrides": "overrides"
|
||||
}
|
||||
```
|
||||
|
||||
## Exclude client mods
|
||||
|
||||
Quite often there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes two options to exclude/include mods:
|
||||
|
||||
@@ -98,14 +172,71 @@ For more complex scenarios, global and per modpack exclusions can be declared in
|
||||
If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true" to ensure the exclude/includes are re-evaluated.
|
||||
|
||||
!!! important
|
||||
These options are provided to empower you to get your server up and running quickly. Please help out by reporting an issue with the respective mod project. Ideally mod developers should [use correct registrations for one-sided client mods](https://docs.minecraftforge.net/en/latest/concepts/sides/#writing-one-sided-mods). Understandably, those code changes may be non-trivial, so mod authors can also add "Client" to the game versions when publishing.
|
||||
These options are provided to empower you to get your server up and running quickly. Please help out by reporting an issue with the respective mod project. Ideally mod developers should [use correct registrations for one-sided client mods](https://docs.minecraftforge.net/en/latest/concepts/sides/#writing-one-sided-mods). Understandably, those code changes may be non-trivial, so mod authors can also add "Client" to the game versions when publishing.
|
||||
|
||||
## Extra options
|
||||
## Excluding Overrides Files
|
||||
|
||||
Modpack zip files typically include an `overrides` subdirectory that may contain 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 `CF_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
|
||||
CF_OVERRIDES_EXCLUSIONS: mods/iris*.jar,mods/sodium*.jar
|
||||
```
|
||||
|
||||
or using newline delimiter, which improves maintainability
|
||||
|
||||
```yaml
|
||||
CF_OVERRIDES_EXCLUSIONS: |
|
||||
mods/iris*.jar
|
||||
mods/sodium*.jar
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Manual CurseForge server packs
|
||||
|
||||
!!! warning "Deprecated"
|
||||
|
||||
This mod platform type is deprecated. Please use [AUTO_CURSEFORGE](auto-curseforge.md) for new deployments.
|
||||
|
||||
Enable this server mode by setting `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
|
||||
|
||||
You need to specify a modpack to run, using the `CF_SERVER_MOD` environment
|
||||
|
||||
@@ -19,6 +19,8 @@ This mod platform type will automatically take care of downloading and installin
|
||||
```
|
||||
- `FTB_MODPACK_VERSION_ID`: optional, the numerical ID of the version to install. If not specified, the latest version will be installed. The "Version ID" can be obtained by hovering over a server file entry and grabbing [this ID in the URL](../../img/ftba-version-id-popup.png).
|
||||
|
||||
- `FTB_FORCE_REINSTALL`: if the files become inconsistent, such as when accidentally removing them, the FTB can be forced to re-run by setting this to "true"
|
||||
|
||||
### Upgrading
|
||||
|
||||
If a specific `FTB_MODPACK_VERSION_ID` was not specified, simply restart the container to pick up the newest modpack version. If using a specific version ID, recreate the container with the new version ID.
|
||||
|
||||
@@ -2,24 +2,104 @@
|
||||
|
||||
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
|
||||
|
||||
The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of:
|
||||
## Modpack project
|
||||
|
||||
The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of:
|
||||
|
||||
- The project "slug", which is located in the URL shown here:
|
||||
|
||||

|
||||
|
||||
- The project ID, which is located in the bottom of the left panel, shown here
|
||||
|
||||

|
||||
|
||||
- The project page URL, such as <https://modrinth.com/modpack/cobblemon-fabric>. As described below, this can further be the page URL of a modpack's version page.
|
||||
|
||||
- A custom URL of a hosted [mrpack file](https://support.modrinth.com/en/articles/8802351-modrinth-modpack-format-mrpack)
|
||||
|
||||
- The container path to a local [mrpack file](https://support.modrinth.com/en/articles/8802351-modrinth-modpack-format-mrpack)
|
||||
|
||||
## Modpack version
|
||||
|
||||
The automatic modpack version resolving can be narrowed in a few ways:
|
||||
|
||||
The latest release or beta version, respectively, of the Modrinth modpack is selected when `VERSION` is "LATEST" or "SNAPSHOT". That can be overridden by setting `MODRINTH_DEFAULT_VERSION_TYPE` to "release", "beta", or "alpha".
|
||||
|
||||
Furthermore, the resolved modpack version can be narrowed by setting `VERSION` to a specific Minecraft version, such as "1.19.2".
|
||||
The resolved modpack version can be narrowed by setting `VERSION` to a specific Minecraft version, such as "1.19.2".
|
||||
|
||||
The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".
|
||||
|
||||
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
|
||||
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
|
||||
|
||||

|
||||
|
||||
## Ignore missing files
|
||||
|
||||
Some mods, such as [MCInstance Loader](https://modrinth.com/mod/mcinstance-loader), use temporary files from the modpack and delete them when finished. 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 `MODRINTH_IGNORE_MISSING_FILES`.
|
||||
|
||||
!!! example
|
||||
|
||||
In a Compose file
|
||||
```yaml
|
||||
environment:
|
||||
MODRINTH_IGNORE_MISSING_FILES: |
|
||||
config/mcinstanceloader/pack.mcinstance
|
||||
```
|
||||
|
||||
## Excluding files
|
||||
|
||||
To exclude client mods that are incorrectly declared by the modpack as server-compatible, set `MODRINTH_EXCLUDE_FILES` to a comma or newline delimited list of partial file names to exclude. 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_EXCLUDE_FILES: |
|
||||
notenoughanimations
|
||||
lambdynamiclights
|
||||
euphoriapatcher
|
||||
```
|
||||
|
||||
## Force-include files
|
||||
|
||||
To force include client mods, set `MODRINTH_FORCE_INCLUDE_FILES` to a comma or newline delimited list of partial file names. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
|
||||
|
||||
!!! example
|
||||
|
||||
In a Compose file:
|
||||
```yaml
|
||||
MODRINTH_FORCE_INCLUDE_FILES: |
|
||||
yet-another-config-lib
|
||||
```
|
||||
|
||||
## Excluding Overrides Files
|
||||
|
||||
Modrinth mrpack/zip files may include an `overrides` subdirectory that contains config files, world data, and extra mod files. All of those files will be extracted into the `/data` path of the container. If any of those files, such as incompatible mods, need to be excluded from extraction, then the `MODRINTH_OVERRIDES_EXCLUSIONS` variable can be set with a comma or newline delimited list of ant-style paths ([see below](#ant-style-paths)) to exclude, relative to the overrides (or `/data`) directory.
|
||||
|
||||
### Ant-style paths
|
||||
|
||||
Ant-style paths can include the following globbing/wildcard symbols:
|
||||
|
||||
| Symbol | Behavior |
|
||||
|--------|---------------------------------------------------------|
|
||||
| `*` | Matches zero, one, or many characters except a slash |
|
||||
| `**` | Matches zero, one, or many characters including slashes |
|
||||
| `?` | Matches one character |
|
||||
|
||||
!!! example
|
||||
|
||||
The following compose `environment` entries show how to exclude Iris and Sodium mods from the overrides
|
||||
|
||||
```yaml
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: mods/NekosEnchantedBooks-*.jar,mods/citresewn-*.jar
|
||||
```
|
||||
|
||||
or using newline delimiter, which improves maintainability
|
||||
|
||||
```yaml
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/NekosEnchantedBooks-*.jar
|
||||
mods/citresewn-*.jar
|
||||
```
|
||||
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
# Bukkit/Spigot
|
||||
|
||||
Enable Bukkit/Spigot server mode by adding a `-e TYPE=BUKKIT` or `-e TYPE=SPIGOT` to your command-line.
|
||||
Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=SPIGOT \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
!!! example
|
||||
|
||||
Command-line
|
||||
```
|
||||
docker run ... -e TYPE=SPIGOT ...
|
||||
```
|
||||
|
||||
Compose
|
||||
```yaml
|
||||
environment:
|
||||
...
|
||||
TYPE: SPIGOT
|
||||
```
|
||||
|
||||
If the downloaded server jar is corrupted, set `FORCE_REDOWNLOAD` to "true" to force a re-download during next container startup. After successfully re-downloading, you should remove that or set to "false".
|
||||
|
||||
@@ -15,16 +23,14 @@ If you are hosting your own copy of Bukkit/Spigot you can override the download
|
||||
- -e BUKKIT_DOWNLOAD_URL=<url>
|
||||
- -e SPIGOT_DOWNLOAD_URL=<url>
|
||||
|
||||
You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true`
|
||||
|
||||
Plugins can either be managed within the `plugins` subdirectory of the [data directory](../../data-directory.md) or you can also [attach a `/plugins` volume](../../mods-and-plugins/index.md#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
|
||||
|
||||
[You can also auto-download plugins using `SPIGET_RESOURCES`.](../../mods-and-plugins/spiget.md)
|
||||
|
||||
!!! note
|
||||
|
||||
Some of the `VERSION` values are not as intuitive as you would think, so make sure to click into the version entry to find the **exact** version needed for the download. For example, "1.8" is not sufficient since their download naming expects `1.8-R0.1-SNAPSHOT-latest` exactly.
|
||||
|
||||
## Build from source
|
||||
|
||||
You can build spigot from source by setting the environment variable `BUILD_FROM_SOURCE` to "true".
|
||||
|
||||
## Alternatives
|
||||
|
||||
### Canyon
|
||||
|
||||
@@ -1,32 +1,57 @@
|
||||
Enable [Forge server](http://www.minecraftforge.net/) mode by adding a `-e TYPE=FORGE` to your command-line.
|
||||
A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded, upgraded, and run by setting the environment variable `TYPE` to "FORGE".
|
||||
|
||||
The overall version is specified by `VERSION`, [as described in the section above](../../versions/minecraft.md) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGE_VERSION`, such as `-e FORGE_VERSION=14.23.5.2854`.
|
||||
!!! example
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=FORGE \
|
||||
-e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
```
|
||||
docker run -e TYPE=FORGE ...
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: FORGE
|
||||
```
|
||||
|
||||
To use a pre-downloaded Forge installer, place it in the attached `/data` directory and
|
||||
specify the name of the installer file with `FORGE_INSTALLER`, such as:
|
||||
The overall version is specified by `VERSION`, [as described in the section above](../../versions/minecraft.md) and provides the same benefits of upgrading as new versions are released. By default, the recommended version of Forge for that Minecraft version will be selected. The latest version can be selected instead by setting the environment variable `FORGE_VERSION` to "latest". You can also choose a specific Forge version by setting `FORGE_VERSION` with that version, such as "14.23.5.2854".
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data ... \
|
||||
-e FORGE_INSTALLER=forge-1.11.2-13.20.0.2228-installer.jar ...
|
||||
```
|
||||
!!! example
|
||||
|
||||
To download a Forge installer from a custom location, such as your own file repository, specify
|
||||
the URL with `FORGE_INSTALLER_URL`, such as:
|
||||
```
|
||||
docker run -e TYPE=FORGE -e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 ...
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: FORGE
|
||||
VERSION: "1.12.2"
|
||||
FORGE_VERSION: "14.23.5.2854"
|
||||
```
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data ... \
|
||||
-e FORGE_INSTALLER_URL=http://HOST/forge-1.11.2-13.20.0.2228-installer.jar ...
|
||||
```
|
||||
To use a pre-downloaded Forge installer, place it in a location mounted into the container and specify the container path with `FORGE_INSTALLER`. To download a Forge installer from a custom location, such as your own file repository, specify the URL with `FORGE_INSTALLER_URL`.
|
||||
|
||||
In both of the cases above, there is no need for the `VERSION` or `FORGEVERSION` variables.
|
||||
In both of the cases above, there is no need for the `VERSION` or `FORGE_VERSION` variables.
|
||||
|
||||
!!! note
|
||||
|
||||
If an error occurred while installing Forge, it might be possible to resolve by temporarily setting `FORGE_FORCE_REINSTALL` to "true". Be sure to remove that variable after successfully starting the server.
|
||||
|
||||
## Alternatives
|
||||
|
||||
### NeoForge
|
||||
|
||||
Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge server can be automatically managed by setting `TYPE` to "NEOFORGE". `VERSION` specifies the Minecraft version and `NEOFORGE_VERSION` can be set to select a specific version, "latest", or "beta". By default, the latest, non-beta NeoForge version available for the requested Minecraft version will be used.
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
docker run -e TYPE=NEOFORGE -e VERSION=1.20.1 -e NEOFORGE_VERSION=47.1.79 ...
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: NEOFORGE
|
||||
VERSION: "1.20.4"
|
||||
NEOFORGE_VERSION: "beta"
|
||||
```
|
||||
|
||||
@@ -8,8 +8,32 @@ A [Magma](https://magmafoundation.org/) server, which is a combination of Forge
|
||||
|
||||
!!! note
|
||||
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
|
||||
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.
|
||||
|
||||
### Magma Maintained
|
||||
A [Magma Maintained](https://github.com/magmamaintained/) server, which is a alternative project of Magma, can be used with
|
||||
|
||||
-e TYPE=MAGMA_MAINTAINED
|
||||
|
||||
!!! note
|
||||
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.18.2", "1.19.3", or "1.20.1".
|
||||
|
||||
In addition, `FORGE_VERSION` and `MAGMA_MAINTAINED_TAG` must be specified. You can find the supported `FORGE_VERSION` and `MAGMA_MAINTAINED_TAG` in a releases page for each repositories.
|
||||
|
||||
### Ketting
|
||||
|
||||
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.1" or later.
|
||||
|
||||
`FORGE_VERSION` and `KETTING_VERSION` may be specified; however, they will be defaulted by the [Ketting launcher](https://github.com/kettingpowered/kettinglauncher) otherwise.
|
||||
Available Ketting Versions may be found at [https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions](https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions).
|
||||
The Version structure is `MinecraftVersion-ForgeVersion-KettingVersion` (e.g. `1.20.1-47.2.20-0.1.4` is for Minecraft `1.20.1`, Forge `47.2.20` and Ketting `0.1.4`).
|
||||
|
||||
### Mohist
|
||||
|
||||
@@ -19,7 +43,7 @@ A [Mohist](https://github.com/MohistMC/Mohist) server can be used with
|
||||
|
||||
!!! note
|
||||
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
||||
|
||||
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Configuration options with defaults:
|
||||
|
||||
!!! note
|
||||
|
||||
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.fandom.com/wiki/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
|
||||
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
|
||||
|
||||
## Crucible
|
||||
|
||||
@@ -48,3 +48,21 @@ Configuration options with defaults:
|
||||
- `CRUCIBLE_RELEASE`=latest
|
||||
|
||||
Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`.
|
||||
|
||||
## Custom
|
||||
|
||||
To use a custom server jar or class files, set `TYPE` to "CUSTOM" and continue with one of the following options:
|
||||
|
||||
The custom jar to be used can be set with `CUSTOM_SERVER` as either a URL to download or the path to a file within the container.
|
||||
|
||||
Alternatively, the final `-jar` invocation can be replaced by setting `CUSTOM_JAR_EXEC` to "`-cp <classpath> <classname>`" or "`-jar <jar file>`" form, such as
|
||||
|
||||
```
|
||||
-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
When using `docker run` make sure to quote the entire value since it has spaces in it, such as
|
||||
|
||||
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"
|
||||
@@ -1,5 +1,11 @@
|
||||
|
||||
### **OS OPTIONS**
|
||||
!!! warning
|
||||
|
||||
The variables listed on this page are manually documented and may be out-of-date or inaccurate.
|
||||
|
||||
All other documentation pages are actively maintained, so please use the search box above to find the desired topic.
|
||||
|
||||
### General options
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -48,7 +54,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
|
||||
/etc/timezone:/etc/timezone:ro</code>
|
||||
</td>
|
||||
<td><code>1G</code></td>
|
||||
<td><code>UTC</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -108,7 +114,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### **SERVER**
|
||||
### Server
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -260,7 +266,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>MODE</code></td>
|
||||
<td>Minecraft servers are configured to run in Survival mode by default. You can change the mode using MODE where you can either provide the <a href="http://minecraft.gamepedia.com/Game_mode#Game_modes">standard numerical values</a> or the shortcut values:<br />
|
||||
<td>Minecraft servers are configured to run in Survival mode by default. You can change the mode using MODE where you can either provide the <a href="http://minecraft.wiki/Game_mode#Game_modes">standard numerical values</a> or the shortcut values:<br />
|
||||
<ul>
|
||||
<li>creative</li>
|
||||
<li>survival</li>
|
||||
@@ -278,14 +284,14 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LEVEL_TYPE</code></td>
|
||||
<td>By default, a standard world is generated with hills, valleys, water, etc. A different level type can be configured by setting LEVEL_TYPE to <a href="https://minecraft.fandom.com/wiki/Server.properties#level-type">an expected type listed here</a>.
|
||||
<td>By default, a standard world is generated with hills, valleys, water, etc. A different level type can be configured by setting LEVEL_TYPE to <a href="https://minecraft.wiki/w/Server.properties#level-type">an expected type listed here</a>.
|
||||
</td>
|
||||
<td><code>minecraft:default</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>GENERATOR_SETTINGS</code></td>
|
||||
<td>For some of the level types, <code>GENERATOR_SETTINGS</code> can be used to further customize the world generation <a href="https://minecraft.fandom.com/wiki/Server.properties#generator-settings">as described here</a>.</td>
|
||||
<td>For some of the level types, <code>GENERATOR_SETTINGS</code> can be used to further customize the world generation <a href="https://minecraft.wiki/w/Server.properties#generator-settings">as described here</a>.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
@@ -448,7 +454,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### **CUSTOM RESOURCE PACK**
|
||||
### Custom resource pack
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -481,7 +487,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### **WHITELIST**
|
||||
### Whitelist
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -520,7 +526,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### **RCON**
|
||||
### RCON
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -534,7 +540,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>ENABLE_RCON</code></td>
|
||||
<td>Should RCON be enabled</td>
|
||||
<td>Enable/disable RCON support; however, be aware that disabling RCON will remove and limit some features, such as interactive and color console support.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
@@ -589,7 +595,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### **AUTOPAUSE**
|
||||
### Auto-Pause
|
||||
|
||||
!!! note
|
||||
|
||||
@@ -652,7 +658,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
|
||||
|
||||
|
||||
### **AUTOSTOP**
|
||||
### Auto-Stop
|
||||
|
||||
!!! note
|
||||
|
||||
@@ -702,11 +708,11 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</table>
|
||||
|
||||
|
||||
### **CURSEFORGE**
|
||||
### CurseForge
|
||||
|
||||
!!! note
|
||||
|
||||
A CurseForge API key is required to use a CurseForge type server. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable CF_API_KEY
|
||||
!!! tip
|
||||
|
||||
Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -1,51 +1,115 @@
|
||||
## Running Minecraft server on different Java version
|
||||
## Image tags
|
||||
|
||||
!!! note
|
||||
Image references can either omit the tag, which implies the tag `latest`, such as
|
||||
|
||||
For Forge versions less than 1.18, you _must_ use the `java8-multiarch` (or other java8) image tag.
|
||||
itzg/minecraft-server
|
||||
|
||||
In general, if you see the following line in a server startup failure, then it means you need to be using Java 8 instead of the latest image Java version:
|
||||
or explicitly include the tag, such as
|
||||
|
||||
```
|
||||
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader
|
||||
cannot be cast to class java.net.URLClassLoader
|
||||
```
|
||||
itzg/minecraft-server:<tag>
|
||||
|
||||
When using the image `itzg/minecraft-server` without a tag, the `latest` image tag is implied from the table below. To use a different version of Java, please use an alternate tag to run your Minecraft server container. The `stable` tag is similar to `latest`; however, it tracks [the most recent repository release/tag](https://github.com/itzg/docker-minecraft-server/releases/latest).
|
||||
where `<tag>` refers to the first column of this table:
|
||||
|
||||
| Tag name | Java version | Linux | JVM Type | Architecture |
|
||||
|-------------------|--------------|--------|-------------|-------------------|
|
||||
| latest | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| stable | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java8 | 8 | Alpine | Hotspot | amd64 |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
|
||||
| java8-multiarch | 8 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java11-jdk | 11 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
|
||||
| java11-openj9 | 11 | Debian | OpenJ9 | amd64 |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
| java17-jdk | 17 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
|
||||
| java17-openj9 | 17 | Debian | OpenJ9 | amd64 |
|
||||
| java17-graalvm-ce | 17 | Oracle | GraalVM CE | amd64,arm64 |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 |
|
||||
| java20-alpine | 19 | Alpine | Hotspot | amd64 |
|
||||
| java20 | 19 | Ubuntu | Hotspot | amd64,arm64 |
|
||||
| Tag | Java version | Linux | JVM Type | Architecture |
|
||||
|------------------|--------------|--------|--------------------|---------------------|
|
||||
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java17-jdk | 17 | Ubuntu | Hotspot+JDK | amd64, arm64, armv7 |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8-alpine | 8 | Alpine | Hotspot | amd64 (1) |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
|
||||
|
||||
For example, to use Java version 8 on any supported architecture:
|
||||
1. Why no arm64 for Java 17 Alpine? That is because the base images, such as [elipse-temurin](https://hub.docker.com/_/eclipse-temurin/tags?page=&page_size=&ordering=&name=17-jre-alpine) do not provide support for that. Use the Ubuntu based images instead.
|
||||
|
||||
docker run --name mc itzg/minecraft-server:java8-multiarch
|
||||
!!! example "Example using java8"
|
||||
|
||||
!!! note
|
||||
|
||||
Keep in mind that some versions of Minecraft server, such as Forge before 1.17, can't work on the newest versions of Java. Instead, one of the Java 8 images should be used. Also, FORGE doesn't support openj9 JVM implementation.
|
||||
With docker run command-line
|
||||
|
||||
Some versions of vanilla Minecraft, such as 1.10, also do not run correctly with Java 17. If in doubt, use `java8-multiarch` for any version less than 1.17.
|
||||
```
|
||||
docker run -it -e EULA=true itzg/minecraft-server:java8
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
```
|
||||
|
||||
### Deprecated Image Tags
|
||||
!!! note "Latest"
|
||||
|
||||
The "latest" tag shifts to include not only the latest features and bug fixes, but also the latest Java version that Mojang requires for the latest Minecraft version.
|
||||
|
||||
!!! tip "Class File Version"
|
||||
|
||||
If the Minecraft startup is logging an error about a "class file version", then refer [to this table](https://javaalmanac.io/bytecode/versions/) to identify the JDK/Java version corresponding to each class file version.
|
||||
|
||||
### Release versions
|
||||
|
||||
Since the tags referenced above will shift as the newest image build brings in new features and bug fixes, released variants of those can also be used to pin a specific build of the image.
|
||||
|
||||
The syntax of released image tags is:
|
||||
|
||||
itzg/minecraft-server:<release>-<java tag>
|
||||
|
||||
where `java tag` still refers to the first column of the table above and `release` refers to [one of the image releases](https://github.com/itzg/docker-minecraft-server/releases).
|
||||
|
||||
!!! example
|
||||
|
||||
For example, the 2024.4.0 release of the Java 17 image would be
|
||||
|
||||
```
|
||||
itzg/minecraft-server:2024.4.0-java17
|
||||
```
|
||||
|
||||
### Stable image tag
|
||||
|
||||
The `stable` image tag combines the benefits of `latest` and [release versions](#release-versions) since it shifts to refer to the most recently released version.
|
||||
|
||||
## Version compatibilities
|
||||
|
||||
[This section in the Minecraft wiki](https://minecraft.wiki/w/Tutorials/Update_Java#Why_update?) lists out versions of **vanilla** Minecraft versions and the corresponding Java version that is required.
|
||||
|
||||
### Forge versions
|
||||
|
||||
Forge and its mods sometimes utilize non-public APIs of the JVM and as such are suspceptible to becoming broken with newer Java versions.
|
||||
|
||||
#### Java 21
|
||||
|
||||
Some mods even up to Minecraft 1.21 require Java 17 and will not run on the latest Java version. If you see an error like the following then be sure to explicitly use a Java 17 tagged image:
|
||||
|
||||
```
|
||||
Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException: java.util.List
|
||||
at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:754)
|
||||
```
|
||||
|
||||
#### Java 8
|
||||
|
||||
For Forge versions less than 1.18, you _must_ use the `java8-multiarch` (or other java8) image tag.
|
||||
|
||||
In general, if you see the following line in a server startup failure, then it means you need to be using Java 8 instead of the latest image Java version:
|
||||
|
||||
```
|
||||
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader
|
||||
cannot be cast to class java.net.URLClassLoader
|
||||
```
|
||||
|
||||
Forge also doesn't support openj9 JVM implementation.
|
||||
|
||||
## Deprecated Image Tags
|
||||
|
||||
The following image tags have been deprecated and are no longer receiving updates:
|
||||
|
||||
- java19
|
||||
- adopt13
|
||||
- adopt14
|
||||
@@ -53,3 +117,9 @@ The following image tags have been deprecated and are no longer receiving update
|
||||
- openj9-nightly
|
||||
- multiarch-latest
|
||||
- java16/java16-openj9
|
||||
- java17-graalvm-ce
|
||||
- java17-openj9
|
||||
- java20-graalvm, java20, java20-alpine
|
||||
- java8-multiarch is still built and pushed, but please move to java8 instead
|
||||
|
||||
[^1]: Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise.
|
||||
@@ -2,7 +2,8 @@ To use a different Minecraft version, pass the `VERSION` environment variable (c
|
||||
|
||||
- LATEST (the default)
|
||||
- SNAPSHOT
|
||||
- or a specific version, such as "1.7.9"
|
||||
- a specific version, such as "1.7.9"
|
||||
- or an alpha and beta version, such as "b1.7.3" (server download might not exist)
|
||||
|
||||
For example, to use the latest snapshot:
|
||||
|
||||
|
||||
4
examples/.gitignore
vendored
4
examples/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
data/
|
||||
modpacks/
|
||||
modpacks/
|
||||
.env
|
||||
downloads/
|
||||
37
examples/aof7/docker-compose.yml
Normal file
37
examples/aof7/docker-compose.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# from .env
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-of-fabric-7
|
||||
# CF_FILENAME_MATCHER: 1.2.2
|
||||
CF_OVERRIDES_EXCLUSIONS: |
|
||||
mods/iris*.jar
|
||||
mods/sodium*.jar
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "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,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
@@ -15,7 +13,7 @@ services:
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
- ../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:
|
||||
@@ -29,12 +27,16 @@ services:
|
||||
filebrowser:
|
||||
image: filebrowser/filebrowser
|
||||
depends_on:
|
||||
- init-filebrowser
|
||||
init-filebrowser:
|
||||
condition: service_completed_successfully
|
||||
user: "1000:1000"
|
||||
environment:
|
||||
FB_DATABASE: /database/filebrowser.db
|
||||
volumes:
|
||||
# Default FB_ROOT is /srv
|
||||
# In this example, the left-side needs to be the same as /data volume of mc service
|
||||
- mc-data:/srv
|
||||
- filebrowser-db:/database
|
||||
- ./filebrowser.json:/.filebrowser.json
|
||||
ports:
|
||||
- "25580:80"
|
||||
|
||||
|
||||
20
examples/atm9/docker-compose.yml
Normal file
20
examples/atm9/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
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/all-the-mods-9
|
||||
# Optional: select a specific version/file
|
||||
#CF_FILENAME_MATCHER: "0.2.34"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
19
examples/auto-cf/modpack-manifest/docker-compose.yml
Normal file
19
examples/auto-cf/modpack-manifest/docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
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_MODPACK_MANIFEST: /manifests/manifest.json
|
||||
CF_SLUG: "custom"
|
||||
MEMORY: 2G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./manifests:/manifests:ro
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
28
examples/auto-cf/modpack-manifest/manifests/manifest.json
Normal file
28
examples/auto-cf/modpack-manifest/manifests/manifest.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"minecraft": {
|
||||
"version": "1.20.4",
|
||||
"modLoaders": [
|
||||
{
|
||||
"id": "fabric-0.15.3",
|
||||
"primary": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"manifestType": "minecraftModpack",
|
||||
"manifestVersion": 1,
|
||||
"name": "Custom",
|
||||
"author": "",
|
||||
"files": [
|
||||
{
|
||||
"projectID": 351725,
|
||||
"fileID": 4973035,
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"projectID": 306612,
|
||||
"fileID": 5010374,
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"overrides": "overrides"
|
||||
}
|
||||
49
examples/auto-cf/using-excludes/docker-compose.yml
Normal file
49
examples/auto-cf/using-excludes/docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
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/minecraft-eternal/files/4102634
|
||||
CF_EXCLUDE_MODS: |
|
||||
cherished-worlds
|
||||
controlling
|
||||
ctm
|
||||
custom-main-menu
|
||||
ding
|
||||
minecraft-rich-presence
|
||||
enchantment-descriptions
|
||||
just-enough-harvestcraft
|
||||
just-enough-resources-jer
|
||||
menumobs
|
||||
more-overlays
|
||||
mouse-tweaks
|
||||
oldjavawarning
|
||||
overloaded-armor-bar
|
||||
reauth
|
||||
thaumic-jei
|
||||
tips
|
||||
armor-toughness-bar
|
||||
waila-harvestability
|
||||
ambientsounds
|
||||
biomeinfo
|
||||
block-drops-jei-addon
|
||||
loot-capacitor-tooltips
|
||||
no-recipe-book
|
||||
packmodemenu
|
||||
resource-reloader
|
||||
|
||||
# blockdrops
|
||||
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
19
examples/bettermc/docker-compose.yml
Normal file
19
examples/bettermc/docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# 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
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc:/data
|
||||
- ../downloads:/downloads
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
30
examples/bmc4/docker-compose.yml
Normal file
30
examples/bmc4/docker-compose.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java17
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: MODRINTH
|
||||
MEMORY: 4G
|
||||
MODRINTH_MODPACK: better-mc-forge-bmc4
|
||||
MODRINTH_VERSION: v26
|
||||
MODRINTH_EXCLUDE_FILES: |
|
||||
citresewn
|
||||
oculus
|
||||
yungsmenutweaks
|
||||
notenoughanimations
|
||||
ryoamiclights
|
||||
euphoriapatcher
|
||||
entity_model_features
|
||||
entity_texture_features
|
||||
3dskinlayers
|
||||
connector
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/NekosEnchantedBooks-*.jar
|
||||
mods/citresewn-*.jar
|
||||
volumes:
|
||||
- data:/data
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
15
examples/curseforge-files/docker-compose.yml
Normal file
15
examples/curseforge-files/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: FORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
VERSION: 1.19.2
|
||||
CURSEFORGE_FILES: |
|
||||
geckolib
|
||||
aquaculture
|
||||
naturalist
|
||||
ports:
|
||||
- "25565:25565"
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
ports:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# CURSEFORGE #
|
||||
# #
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE_GENERIC_PACK #
|
||||
# #
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
# FTBA support is only available in non-Alpine images
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE GENERIC_PACK #
|
||||
# #
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-latest}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./data:/data
|
||||
- ./mods:/mods
|
||||
ports:
|
||||
- "25565:25565"
|
||||
@@ -12,10 +10,5 @@ services:
|
||||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.19.2"
|
||||
DEBUG: "true"
|
||||
SETUP_ONLY: "true"
|
||||
tty: True
|
||||
stdin_open: True
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
tty: true
|
||||
stdin_open: true
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
20
examples/docker-compose-ngrok.yml
Normal file
20
examples/docker-compose-ngrok.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
|
||||
ngrok:
|
||||
image: shkoliar/ngrok:latest
|
||||
ports:
|
||||
- 4551:4551
|
||||
environment:
|
||||
- PARAMS=tcp -region=us -authtoken=YourAuthTokenHere mc:25565
|
||||
@@ -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}
|
||||
@@ -10,10 +8,12 @@ services:
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FABRIC
|
||||
MODS_FORGEAPI_PROJECTIDS: 433175
|
||||
MODS_FORGEAPI_KEY: ${MODS_FORGEAPI_KEY}
|
||||
MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES: "TRUE"
|
||||
REMOVE_OLD_FORGEAPI_MODS: "TRUE"
|
||||
MEMORY: "2G"
|
||||
CURSEFORGE_FILES: |
|
||||
fabric-api
|
||||
chunky-pregenerator
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
# YAML Heredoc, be sure to use '|-' this will remove the first newline and final new line.
|
||||
# This is versus '|' that will leaving with two empty strings at top and bottom.
|
||||
RCON_CMDS_STARTUP: |-
|
||||
|
||||
@@ -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,18 +1,18 @@
|
||||
version: "3"
|
||||
# NOTE
|
||||
# This file is 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/
|
||||
|
||||
services:
|
||||
mc:
|
||||
# Only using IMAGE variable to allow for local testing
|
||||
image: itzg/minecraft-server
|
||||
# image: ${IMAGE:-itzg/minecraft-server}
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: SPIGOT
|
||||
# SPIGET_RESOURCES: 34315,3836
|
||||
SPIGET_RESOURCES: ""
|
||||
REMOVE_OLD_MODS: "true"
|
||||
TYPE: PAPER
|
||||
SPIGET_RESOURCES: 34315,3836
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
|
||||
@@ -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
examples/downloads/.gitignore
vendored
Normal file
1
examples/downloads/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.jar
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
14
examples/jline/docker-compose.yml
Normal file
14
examples/jline/docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: FABRIC
|
||||
MODRINTH_PROJECTS: |
|
||||
jline4mcdsrv
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -19,6 +19,7 @@ spec:
|
||||
containers:
|
||||
- name: mc
|
||||
image: itzg/minecraft-server
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: EULA
|
||||
value: "TRUE"
|
||||
|
||||
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"
|
||||
32
examples/lazytainer/docker_compose.yml
Normal file
32
examples/lazytainer/docker_compose.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
services:
|
||||
lazytainer:
|
||||
image: ghcr.io/vmorganp/lazytainer:master
|
||||
environment:
|
||||
VERBOSE: false
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
labels:
|
||||
- lazytainer.group.minecraft.sleepMethod=stop
|
||||
- lazytainer.group.minecraft.ports=25565
|
||||
- lazytainer.group.minecraft.minPacketThreshold=2 # Start after two incomming packets
|
||||
- lazytainer.group.minecraft.inactiveTimeout=600 # 10 minutes, to allow the server to bootstrap. You can probably make this lower later if you want.
|
||||
restart: unless-stopped
|
||||
network_mode: bridge
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: TRUE
|
||||
TYPE: PAPER
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- ./data:/data
|
||||
labels:
|
||||
- lazytainer.group=minecraft
|
||||
depends_on:
|
||||
- lazytainer
|
||||
network_mode: service:lazytainer
|
||||
tty: true
|
||||
stdin_open: true
|
||||
restart: unless-stopped
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
@@ -10,9 +8,9 @@ services:
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
MOD_PLATFORM: MODRINTH
|
||||
MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
|
||||
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
|
||||
# or for auto-upgrading to latest
|
||||
# MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric
|
||||
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric
|
||||
# or just cobblemon-fabric or 5FFgwNNP
|
||||
# and could replace version URL with
|
||||
# MODRINTH_VERSION: nvrqJg44
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
|
||||
15
examples/modrinth/local-modpack/docker-compose.yml
Normal file
15
examples/modrinth/local-modpack/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: MODRINTH
|
||||
# Download the mrpack file from https://modrinth.com/modpack/cobblemon-fabric/version/1.4.1 and place in
|
||||
# modpacks directory next to this compose file.
|
||||
MODRINTH_MODPACK: /modpacks/Cobblemon Modpack [Fabric] 1.4.1.mrpack
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
@@ -10,7 +8,7 @@ services:
|
||||
MODS_FILE: /extras/mods.txt
|
||||
REMOVE_OLD_MODS: "true"
|
||||
ports:
|
||||
- 25565:25565
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./mods.txt:/extras/mods.txt:ro
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: itzg/bungeecord
|
||||
@@ -10,7 +8,16 @@ services:
|
||||
volumes:
|
||||
- waterfall:/server
|
||||
- ./waterfall-config:/config
|
||||
|
||||
# If you want to use Velocity here is a premade version that supports Velocity
|
||||
# velocity-proxy:
|
||||
# image: itzg/bungeecord
|
||||
# environment:
|
||||
# TYPE: VELOCITY
|
||||
# ports:
|
||||
# - "25565:25577"
|
||||
# volumes:
|
||||
# - velocity:/server
|
||||
# - ./velocity-config:/config
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
@@ -38,4 +45,4 @@ networks:
|
||||
dbs:
|
||||
# declared in ../dbs
|
||||
external: true
|
||||
name: dbs_default
|
||||
name: dbs_default
|
||||
|
||||
@@ -706,5 +706,5 @@ update-client-command-list: true
|
||||
register-command-list-data: true
|
||||
|
||||
# If LuckPerms should attempt to resolve Vanilla command target selectors for LP commands.
|
||||
# See here for more info: https://minecraft.gamepedia.com/Commands#Target_selectors
|
||||
# See here for more info: https://minecraft.wiki/Commands#Target_selectors
|
||||
resolve-command-selectors: false
|
||||
|
||||
155
examples/multi-project/servers/velocity-config/velocity.toml
Normal file
155
examples/multi-project/servers/velocity-config/velocity.toml
Normal file
@@ -0,0 +1,155 @@
|
||||
# Config version. Do not change this
|
||||
config-version = "2.6"
|
||||
|
||||
# What port should the proxy be bound to? By default, we'll bind to all addresses on port 25565.
|
||||
bind = "0.0.0.0:25565"
|
||||
|
||||
# What should be the MOTD? This gets displayed when the player adds your server to
|
||||
# their server list. Only MiniMessage format is accepted.
|
||||
motd = "<#09add3>A Velocity Server"
|
||||
|
||||
# What should we display for the maximum number of players? (Velocity does not support a cap
|
||||
# on the number of players online.)
|
||||
show-max-players = 500
|
||||
|
||||
# Should we authenticate players with Mojang? By default, this is on.
|
||||
online-mode = true
|
||||
|
||||
# Should the proxy enforce the new public key security standard? By default, this is on.
|
||||
force-key-authentication = true
|
||||
|
||||
# If client's ISP/AS sent from this proxy is different from the one from Mojang's
|
||||
# authentication server, the player is kicked. This disallows some VPN and proxy
|
||||
# connections but is a weak form of protection.
|
||||
prevent-client-proxy-connections = false
|
||||
|
||||
# Should we forward IP addresses and other data to backend servers?
|
||||
# Available options:
|
||||
# - "none": No forwarding will be done. All players will appear to be connecting
|
||||
# from the proxy and will have offline-mode UUIDs.
|
||||
# - "legacy": Forward player IPs and UUIDs in a BungeeCord-compatible format. Use this
|
||||
# if you run servers using Minecraft 1.12 or lower.
|
||||
# - "bungeeguard": Forward player IPs and UUIDs in a format supported by the BungeeGuard
|
||||
# plugin. Use this if you run servers using Minecraft 1.12 or lower, and are
|
||||
# unable to implement network level firewalling (on a shared host).
|
||||
# - "modern": Forward player IPs and UUIDs as part of the login process using
|
||||
# Velocity's native forwarding. Only applicable for Minecraft 1.13 or higher.
|
||||
player-info-forwarding-mode = "NONE"
|
||||
|
||||
# If you are using modern or BungeeGuard IP forwarding, configure a file that contains a unique secret here.
|
||||
# The file is expected to be UTF-8 encoded and not empty.
|
||||
forwarding-secret-file = "forwarding.secret"
|
||||
|
||||
# Announce whether or not your server supports Forge. If you run a modded server, we
|
||||
# suggest turning this on.
|
||||
#
|
||||
# If your network runs one modpack consistently, consider using ping-passthrough = "mods"
|
||||
# instead for a nicer display in the server list.
|
||||
announce-forge = false
|
||||
|
||||
# If enabled (default is false) and the proxy is in online mode, Velocity will kick
|
||||
# any existing player who is online if a duplicate connection attempt is made.
|
||||
kick-existing-players = false
|
||||
|
||||
# Should Velocity pass server list ping requests to a backend server?
|
||||
# Available options:
|
||||
# - "disabled": No pass-through will be done. The velocity.toml and server-icon.png
|
||||
# will determine the initial server list ping response.
|
||||
# - "mods": Passes only the mod list from your backend server into the response.
|
||||
# The first server in your try list (or forced host) with a mod list will be
|
||||
# used. If no backend servers can be contacted, Velocity won't display any
|
||||
# mod information.
|
||||
# - "description": Uses the description and mod list from the backend server. The first
|
||||
# server in the try (or forced host) list that responds is used for the
|
||||
# description and mod list.
|
||||
# - "all": Uses the backend server's response as the proxy response. The Velocity
|
||||
# configuration is used if no servers could be contacted.
|
||||
ping-passthrough = "DISABLED"
|
||||
|
||||
# If not enabled (default is true) player IP addresses will be replaced by <ip address withheld> in logs
|
||||
enable-player-address-logging = true
|
||||
|
||||
[servers]
|
||||
# Configure your servers here. Each key represents the server's name, and the value
|
||||
# represents the IP address of the server to connect to.
|
||||
lobby = "127.0.0.1:30066"
|
||||
factions = "127.0.0.1:30067"
|
||||
minigames = "127.0.0.1:30068"
|
||||
|
||||
# In what order we should try servers when a player logs in or is kicked from a server.
|
||||
try = [
|
||||
"lobby"
|
||||
]
|
||||
|
||||
[forced-hosts]
|
||||
# Configure your forced hosts here.
|
||||
"lobby.example.com" = [
|
||||
"lobby"
|
||||
]
|
||||
"factions.example.com" = [
|
||||
"factions"
|
||||
]
|
||||
"minigames.example.com" = [
|
||||
"minigames"
|
||||
]
|
||||
|
||||
[advanced]
|
||||
# How large a Minecraft packet has to be before we compress it. Setting this to zero will
|
||||
# compress all packets, and setting it to -1 will disable compression entirely.
|
||||
compression-threshold = 256
|
||||
|
||||
# How much compression should be done (from 0-9). The default is -1, which uses the
|
||||
# default level of 6.
|
||||
compression-level = -1
|
||||
|
||||
# How fast (in milliseconds) are clients allowed to connect after the last connection? By
|
||||
# default, this is three seconds. Disable this by setting this to 0.
|
||||
login-ratelimit = 3000
|
||||
|
||||
# Specify a custom timeout for connection timeouts here. The default is five seconds.
|
||||
connection-timeout = 5000
|
||||
|
||||
# Specify a read timeout for connections here. The default is 30 seconds.
|
||||
read-timeout = 30000
|
||||
|
||||
# Enables compatibility with HAProxy's PROXY protocol. If you don't know what this is for, then
|
||||
# don't enable it.
|
||||
haproxy-protocol = false
|
||||
|
||||
# Enables TCP fast open support on the proxy. Requires the proxy to run on Linux.
|
||||
tcp-fast-open = false
|
||||
|
||||
# Enables BungeeCord plugin messaging channel support on Velocity.
|
||||
bungee-plugin-message-channel = true
|
||||
|
||||
# Shows ping requests to the proxy from clients.
|
||||
show-ping-requests = false
|
||||
|
||||
# By default, Velocity will attempt to gracefully handle situations where the user unexpectedly
|
||||
# loses connection to the server without an explicit disconnect message by attempting to fall the
|
||||
# user back, except in the case of read timeouts. BungeeCord will disconnect the user instead. You
|
||||
# can disable this setting to use the BungeeCord behavior.
|
||||
failover-on-unexpected-server-disconnect = true
|
||||
|
||||
# Declares the proxy commands to 1.13+ clients.
|
||||
announce-proxy-commands = true
|
||||
|
||||
# Enables the logging of commands
|
||||
log-command-executions = false
|
||||
|
||||
# Enables logging of player connections when connecting to the proxy, switching servers
|
||||
# and disconnecting from the proxy.
|
||||
log-player-connections = true
|
||||
|
||||
[query]
|
||||
# Whether to enable responding to GameSpy 4 query responses or not.
|
||||
enabled = false
|
||||
|
||||
# If query is enabled, on what port should the query protocol listen on?
|
||||
port = 25565
|
||||
|
||||
# This is the map name that is reported to the query services.
|
||||
map = "Velocity"
|
||||
|
||||
# Whether plugins should be shown in query response by default or not
|
||||
show-plugins = false
|
||||
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"
|
||||
14
examples/neoforge/docker-compose.yml
Normal file
14
examples/neoforge/docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: NEOFORGE
|
||||
VERSION: latest
|
||||
NEOFORGE_VERSION: beta
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc:/data
|
||||
volumes:
|
||||
mc: {}
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
@@ -14,7 +12,7 @@ services:
|
||||
# Modpack client zip must be manually downloaded from
|
||||
# https://www.curseforge.com/minecraft/modpacks/one-block-modded
|
||||
# due to authors disallowing project distribution
|
||||
CF_MODPACK_ZIP: /modpacks/Modded+OneBock.zip
|
||||
CF_MODPACK_ZIP: /modpacks/Modded+OneBlock.zip
|
||||
CF_SET_LEVEL_FROM: OVERRIDES
|
||||
DEBUG: "false"
|
||||
MEMORY: 4G
|
||||
@@ -23,4 +21,4 @@ services:
|
||||
- ./modpacks:/modpacks:ro
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
mc-data: {}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
mc:
|
||||
build: .
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user