mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0f1a7e1cb | ||
|
|
06ba3c8c77 | ||
|
|
0ec908b243 | ||
|
|
d9615e3558 | ||
|
|
dcf2f46620 | ||
|
|
8ba47ea280 | ||
|
|
21593d2e43 | ||
|
|
c8a7513322 | ||
|
|
66d0605502 | ||
|
|
5fad540c57 | ||
|
|
04713222c9 | ||
|
|
483cd3a1d8 | ||
|
|
5b549c0483 | ||
|
|
c57760e4b4 | ||
|
|
fd3655be88 | ||
|
|
d6897a649e | ||
|
|
9f1a18ef34 | ||
|
|
dedf8bc587 | ||
|
|
abb33d20fb | ||
|
|
6b4985c38d | ||
|
|
16a7f7ae03 | ||
|
|
20db1c9eb0 | ||
|
|
dac388268f | ||
|
|
231ac0f665 | ||
|
|
68a56be107 | ||
|
|
ac32c8706f | ||
|
|
f5e511e3cc | ||
|
|
2a859d61f6 | ||
|
|
943429e180 | ||
|
|
7e5f5805a5 | ||
|
|
777f4e26b9 | ||
|
|
21f2a7e86c | ||
|
|
f22d291bfc | ||
|
|
5fd2522028 | ||
|
|
a7b35d955b | ||
|
|
73e402b46d | ||
|
|
73cb6333b7 | ||
|
|
6f190a68a2 | ||
|
|
4eedde802b | ||
|
|
8bb7ea9000 | ||
|
|
fcfb1cd74c | ||
|
|
beb3b4a2ce | ||
|
|
dcdbb85936 | ||
|
|
3a678a6bf3 | ||
|
|
b1128db9cc | ||
|
|
b32666183a | ||
|
|
dcf4ae89fb | ||
|
|
066116fd35 | ||
|
|
7404122956 | ||
|
|
78217928c1 | ||
|
|
b74de64009 | ||
|
|
1fb7e50c0d | ||
|
|
5742a34658 | ||
|
|
7cdb7d398c | ||
|
|
26d97c21cc | ||
|
|
40daa8b803 | ||
|
|
dff4673094 | ||
|
|
6bb2c3a8c4 | ||
|
|
0ff1e993d0 | ||
|
|
319315a001 | ||
|
|
6c10f265c8 | ||
|
|
0e3f75879d | ||
|
|
b595c107bb | ||
|
|
3613a30709 | ||
|
|
da1b052516 | ||
|
|
abb3af07ba | ||
|
|
4f1a09b2a9 | ||
|
|
4e63990bd7 | ||
|
|
883d64159f | ||
|
|
d35b78c14e | ||
|
|
d420c523a3 | ||
|
|
1e28390d1b | ||
|
|
f79ef8f3a7 | ||
|
|
a485f84797 | ||
|
|
51ba6a2c71 | ||
|
|
e5b7a5829f | ||
|
|
6a994acc52 | ||
|
|
f46298c6b8 | ||
|
|
a72fb19ec6 | ||
|
|
4914ffbe40 | ||
|
|
03f9037668 | ||
|
|
621bafb4f2 | ||
|
|
9a20ab7b48 | ||
|
|
6514ed85a0 | ||
|
|
6391be5251 | ||
|
|
2d1a35dba8 | ||
|
|
236ed74295 | ||
|
|
05cbbfc9e3 | ||
|
|
678dda5d4a | ||
|
|
c3e96f6ac6 |
38
.github/workflows/build-multiarch.yml
vendored
38
.github/workflows/build-multiarch.yml
vendored
@@ -20,10 +20,12 @@ jobs:
|
||||
matrix:
|
||||
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
|
||||
variant:
|
||||
- java21-graalvm
|
||||
- java24
|
||||
- java24-graalvm
|
||||
- java21
|
||||
- java21-jdk
|
||||
- java21-alpine
|
||||
- java21-graalvm
|
||||
- java21-jdk
|
||||
- java17
|
||||
- java17-graalvm
|
||||
- java17-alpine
|
||||
@@ -31,8 +33,16 @@ jobs:
|
||||
- java8-graalvm-ce
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java11
|
||||
include:
|
||||
# JAVA 24
|
||||
- variant: java24
|
||||
baseImage: eclipse-temurin:24-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java24-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:24-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
# JAVA 21:
|
||||
- variant: java21-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:21-ol8
|
||||
@@ -64,11 +74,6 @@ jobs:
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
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
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
@@ -100,7 +105,7 @@ jobs:
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.6.1
|
||||
uses: docker/metadata-action@v5.7.0
|
||||
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.
|
||||
@@ -128,13 +133,13 @@ jobs:
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.7.1
|
||||
uses: docker/setup-buildx-action@v3.10.0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.2.0
|
||||
uses: docker/setup-qemu-action@v3.6.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v6.10.0
|
||||
uses: docker/build-push-action@v6.16.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
@@ -157,14 +162,14 @@ jobs:
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.3.0
|
||||
uses: docker/login-action@v3.4.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3.3.0
|
||||
uses: docker/login-action@v3.4.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -172,7 +177,7 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6.10.0
|
||||
uses: docker/build-push-action@v6.16.0
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
@@ -196,5 +201,8 @@ jobs:
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
BUILD_FILES_REV=${{ steps.build-files-rev.outputs.REV }}
|
||||
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
||||
|
||||
6
.github/workflows/verify-pr.yml
vendored
6
.github/workflows/verify-pr.yml
vendored
@@ -53,10 +53,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.7.1
|
||||
uses: docker/setup-buildx-action@v3.10.0
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v6.10.0
|
||||
uses: docker/build-push-action@v6.16.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v6.10.0
|
||||
uses: docker/build-push-action@v6.16.0
|
||||
with:
|
||||
# Only build single platform since loading multi-arch image into daemon fails with
|
||||
# "docker exporter does not currently support exporting manifest lists"
|
||||
|
||||
17
Dockerfile
17
Dockerfile
@@ -26,31 +26,31 @@ EXPOSE 25565
|
||||
ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
ARG EASY_ADD_VERSION=0.8.8
|
||||
ARG EASY_ADD_VERSION=0.8.10
|
||||
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.5
|
||||
ARG RESTIFY_VERSION=1.7.8
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG RCON_CLI_VERSION=1.6.9
|
||||
ARG RCON_CLI_VERSION=1.7.0
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_MONITOR_VERSION=0.15.0
|
||||
ARG MC_MONITOR_VERSION=0.15.5
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.3
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.6
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.40.6
|
||||
ARG MC_HELPER_VERSION=1.41.7
|
||||
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
|
||||
@@ -78,3 +78,8 @@ RUN dos2unix /start* /auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
||||
|
||||
ARG BUILDTIME=local
|
||||
ARG VERSION=local
|
||||
ARG REVISION=local
|
||||
RUN echo "buildtime=${BUILDTIME}\nversion=${VERSION}\nrevision=${REVISION}" > /etc/image.properties
|
||||
|
||||
10
README.md
10
README.md
@@ -1,5 +1,5 @@
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
[](https://github.com/itzg/docker-minecraft-server/issues)
|
||||
[](https://discord.gg/DXfKpjB)
|
||||
[](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml)
|
||||
@@ -10,10 +10,12 @@
|
||||
|
||||
There you will find things like
|
||||
- [Quick start with Docker Compose](https://docker-minecraft-server.readthedocs.io/en/latest/#using-docker-compose)
|
||||
- Running [different versions of Minecraft](https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/) and using [various server types](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
|
||||
- Running [different versions of Minecraft](https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/) and using [various server types](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/) for Java Edition
|
||||
- [Setting server properties via container environment variables](https://docker-minecraft-server.readthedocs.io/en/latest/configuration/server-properties/)
|
||||
- [Managing mods and plugins with automated downloads and cleanup](https://docker-minecraft-server.readthedocs.io/en/latest/mods-and-plugins/)
|
||||
- [Using various modpack providers/platforms](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
|
||||
- ...and much more
|
||||
|
||||
There are also many examples located in [the examples directory](examples) of this repo.
|
||||
There are also many examples located in [the examples directory](examples) of this repo.
|
||||
|
||||
This image only supports Java edition natively; however, if looking for a server that is compatible with Bedrock edition, then use [itzg/minecraft-bedrock-server](https://github.com/itzg/docker-minecraft-bedrock-server) or [refer to this section](https://docker-minecraft-server.readthedocs.io/en/latest/misc/examples/#bedrock-compatible-server) to add Bedrock compatibility to a Java edition server.
|
||||
|
||||
@@ -24,6 +24,7 @@ apk add --no-cache -U \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
ncurses \
|
||||
sudo \
|
||||
tar \
|
||||
zstd \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM python:3.8
|
||||
FROM python:3.9
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
|
||||
@@ -4,14 +4,10 @@ title: Modifying config files
|
||||
|
||||
## Replacing variables inside configs
|
||||
|
||||
Sometimes you have mods or plugins that require configuration information that is only available at runtime.
|
||||
For example if you need to configure a plugin to connect to a database,
|
||||
you don't want to include this information in your Git repository or Docker image.
|
||||
Or maybe you have some runtime information like the server name that needs to be set
|
||||
in your config files after the container starts.
|
||||
Sometimes you have mods or plugins that require configuration information that is only available at deploy-time. For example if you need to configure a plugin to connect to a database, you don't want to include this information in your Git repository or Docker image.
|
||||
Or maybe you have some runtime information like the server name that needs to be set in your config files after the container starts.
|
||||
|
||||
For those cases there is the option to replace defined variables inside your configs
|
||||
with environment variables defined at container runtime.
|
||||
For those cases there is the option to replace defined variables inside your configs with environment variables defined at container runtime.
|
||||
|
||||
When the environment variable `REPLACE_ENV_IN_PLACE` is set to `true` (the default), the startup script will go through all files inside the container's `/data` path and replace variables that match the container's environment variables. Variables can instead (or in addition to) be replaced in files sync'ed from `/plugins`, `/mods`, and `/config` by setting `REPLACE_ENV_DURING_SYNC` to `true` (defaults to `false`).
|
||||
|
||||
|
||||
@@ -46,8 +46,9 @@ To let the JVM calculate the heap size from the container declared memory limit,
|
||||
MEMORY: ""
|
||||
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
|
||||
deploy:
|
||||
limits:
|
||||
memory: 4G
|
||||
resources:
|
||||
limits:
|
||||
memory: 4G
|
||||
```
|
||||
|
||||
!!! important
|
||||
|
||||
@@ -55,6 +55,16 @@ To allow time for players to finish what they're doing during a graceful server
|
||||
|
||||
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
|
||||
|
||||
The `STOP_SERVER_ANNOUNCE_DELAY` can be bypassed by sending a `SIGUSR1` signal to the `mc-server-runner` process.
|
||||
|
||||
`docker`:
|
||||
|
||||
docker stop --signal SIGUSR1 mc
|
||||
|
||||
`docker compose`:
|
||||
|
||||
docker compose kill --signal SIGUSR1
|
||||
|
||||
## Configuration Options for Minecraft Server Health Monitoring
|
||||
|
||||
The image tags include specific variables to simplify configuration for monitoring the health of a Minecraft server:
|
||||
|
||||
@@ -197,14 +197,34 @@ New to [22W42A](https://www.minecraft.net/en-us/article/minecraft-snapshot-22w42
|
||||
|
||||
### Server icon
|
||||
|
||||
A server icon can be configured using the `ICON` variable. The image will be automatically
|
||||
downloaded, scaled, and converted from any other image format:
|
||||
A server icon can be configured by setting the `ICON` variable to a URL to download or a container path. The image will be automatically downloaded (if a URL), scaled, and converted from any other image format:
|
||||
|
||||
!!! example
|
||||
|
||||
Using `docker run`:
|
||||
|
||||
```
|
||||
docker run -d -e ICON=http://..../some/image.png ...
|
||||
```
|
||||
|
||||
In compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
ICON: http://..../some/image.png
|
||||
```
|
||||
|
||||
Using a file from host filesystem:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
ICON: /icon.png
|
||||
OVERRIDE_ICON: true
|
||||
volumes:
|
||||
./icon.png:/icon.png
|
||||
```
|
||||
|
||||
The server icon which has been set doesn't get overridden by default. It can be changed and overridden by setting `OVERRIDE_ICON` to `TRUE`.
|
||||
|
||||
docker run -d -e ICON=http://..../some/other/image.png -e OVERRIDE_ICON=TRUE...
|
||||
By default an existing `server-icon.png` file will not be replaced, that can be changed by setting `OVERRIDE_ICON` to "true".
|
||||
|
||||
### RCON
|
||||
|
||||
@@ -502,4 +522,4 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| LOG_IPS | log-ips |
|
||||
| REGION_FILE_COMPRESSION | region-file-compression |
|
||||
| BUG_REPORT_LINK | bug-report-link |
|
||||
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
|
||||
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
|
||||
|
||||
@@ -19,7 +19,7 @@ where, in this case, the standard server port 25565, will be exposed on your hos
|
||||
|
||||
!!! note
|
||||
|
||||
If you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#using-docker-compose) or [Kubernetes](#deployment-templates-and-examples) to allow for incremental reconfiguration and image upgrades.
|
||||
If you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#using-docker-compose) or [Kubernetes](misc/deployment/index.md#on-kubernetes) to allow for incremental reconfiguration and image upgrades.
|
||||
|
||||
!!! info
|
||||
|
||||
@@ -58,6 +58,9 @@ To apply changes made to the compose file, just run `docker compose up -d` again
|
||||
|
||||
Follow the logs of the container using `docker compose logs -f`, check on the status with `docker compose ps`, and stop the container using `docker compose stop`.
|
||||
|
||||
!!! note "Configurator Tool"
|
||||
If you prefer to use an interactive tool to create or edit a Docker Compose file for this image, you can check out [setupmc.com's configurator](https://setupmc.com/java-server/). It provides a form that supports most of the image variables and generates the `compose.yml` file in real time.
|
||||
|
||||
!!! note "More Compose Examples"
|
||||
There are more [examples located in the Github repo](https://github.com/itzg/docker-minecraft-server/tree/master/examples).
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ The following environment variables define the behaviour of auto-pausing:
|
||||
describes period of the daemonized state machine, that handles the pausing of the process (resuming is done independently)
|
||||
- `AUTOPAUSE_KNOCK_INTERFACE`, default `eth0`
|
||||
<br>Describes the interface passed to the `knockd` daemon. If the default interface does not work, run the `ifconfig` command inside the container and derive the interface receiving the incoming connection from its output. The passed interface must exist inside the container. Using the loopback interface (`lo`) does likely not yield the desired results.
|
||||
- `AUTOPAUSE_STATUS_RETRY_LIMIT`, default 10
|
||||
- `AUTOPAUSE_STATUS_RETRY_INTERVAL`, default 2s
|
||||
|
||||
!!! tip
|
||||
|
||||
|
||||
@@ -17,12 +17,14 @@ Enable the Autostop functionality by setting:
|
||||
```
|
||||
|
||||
The following environment variables define the behavior of auto-stopping:
|
||||
* `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
|
||||
- `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
|
||||
describes the time between the last client disconnect and the stopping of the server (read as timeout established)
|
||||
* `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
|
||||
- `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
|
||||
describes the time between server start and the stopping of the server, when no client connects in-between (read as timeout initialized)
|
||||
* `AUTOSTOP_PERIOD`, default `10` (seconds)
|
||||
- `AUTOSTOP_PERIOD`, default `10` (seconds)
|
||||
describes period of the daemonized state machine, that handles the stopping of the server
|
||||
- `AUTOPAUSE_STATUS_RETRY_LIMIT`, default 10
|
||||
- `AUTOPAUSE_STATUS_RETRY_INTERVAL`, default 2s
|
||||
|
||||
> To troubleshoot, add `DEBUG_AUTOSTOP=true` to see additional output
|
||||
|
||||
|
||||
@@ -31,15 +31,33 @@ services:
|
||||
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
|
||||
|
||||
```yaml
|
||||
# Lazymc requires that the minecraft server have a static IP.
|
||||
#
|
||||
# To ensure that our servers have a static IP we need to create
|
||||
# a network for our services to use.
|
||||
#
|
||||
# By default, Docker uses 172.17.0.0/16 subnet range.
|
||||
# So we need to create a new network in a different subnet
|
||||
# See the readme for more information.
|
||||
#
|
||||
# Please ensure that the subnet falls within the private CIDRs:
|
||||
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
|
||||
#
|
||||
# And that it is not in use by anything else.
|
||||
networks:
|
||||
minecraft-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.18.0.0/16
|
||||
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
# the IPs should start at .2 as .1 is reserved for the gateway
|
||||
networks:
|
||||
minecraft-network:
|
||||
ipv4_address: 172.18.0.2
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
@@ -54,11 +72,19 @@ services:
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# Assign a static IP to the server container
|
||||
networks:
|
||||
minecraft-network:
|
||||
ipv4_address: 172.18.0.3
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
# Set lazymc.enabled to true to enable lazymc on this container
|
||||
- lazymc.enabled=true
|
||||
# Required to find the container to manage it
|
||||
- lazymc.group=mc
|
||||
# Point to the service name of the Minecraft server
|
||||
- lazymc.server.address=mc:25565
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
@@ -113,4 +139,4 @@ services:
|
||||
stdin_open: true
|
||||
restart: unless-stopped
|
||||
```
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
|
||||
|
||||
@@ -5,3 +5,34 @@ To troubleshoot just the command-line used to start the Minecraft server, set th
|
||||
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
|
||||
|
||||
If you are experiencing any issues with the "Changing ownership of /data" step, that can be disabled by setting `SKIP_CHOWN_DATA` to `true`.
|
||||
|
||||
To confirm the image version that has been pulled, use the following command, replacing `itzg/minecraft-server` as needed for specific image tags:
|
||||
|
||||
## Image labels
|
||||
|
||||
```shell
|
||||
docker image inspect itzg/minecraft-server -f "{{json .Config.Labels}}"
|
||||
```
|
||||
|
||||
such as
|
||||
|
||||
```json
|
||||
{
|
||||
"org.opencontainers.image.authors": "... <...@gmail.com>",
|
||||
"org.opencontainers.image.created": "2025-04-03T02:15:51.405Z",
|
||||
"org.opencontainers.image.description": "Docker image that provides a Minecraft Server for Java Edition that automatically downloads selected version at startup",
|
||||
"org.opencontainers.image.licenses": "Apache-2.0",
|
||||
"org.opencontainers.image.ref.name": "ubuntu",
|
||||
"org.opencontainers.image.revision": "d6897a649ecbc16b5fb2e1500e24b64ef80270a0",
|
||||
"org.opencontainers.image.source": "https://github.com/itzg/docker-minecraft-server",
|
||||
"org.opencontainers.image.title": "docker-minecraft-server",
|
||||
"org.opencontainers.image.url": "https://github.com/itzg/docker-minecraft-server",
|
||||
"org.opencontainers.image.version": "java21"
|
||||
}
|
||||
```
|
||||
|
||||
The labels that are most interesting are:
|
||||
|
||||
- `org.opencontainers.image.created` : the date/time the image was built
|
||||
- `org.opencontainers.image.revision` : which maps to <https://github.com/itzg/docker-minecraft-server/commit/REVISION>
|
||||
- `org.opencontainers.image.version` : image tag and variant [as described in this page](../versions/java.md)
|
||||
@@ -80,6 +80,10 @@ Example of expected VanillaTweaks share codes:
|
||||
VANILLATWEAKS_SHARECODE: MGr52E,tF1zL2,LnEDwT
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
Datapack names are all lower case. [See their spec](https://vanillatweaks.net/assets/resources/json/1.21/dpcategories.json) for a full list of 1.21 datapacks, and [their spec](https://vanillatweaks.net/assets/resources/json/1.21/ctcategories.json) for a full list of 1.21 crafting tweaks.
|
||||
|
||||
Example of expected VanillaTweaks files:
|
||||
|
||||
``` yaml
|
||||
@@ -89,13 +93,14 @@ VANILLATWEAKS_FILE: /config/vt-datapacks.json,/config/vt-craftingtweaks.json,/co
|
||||
``` json title="DataPacks json"
|
||||
{
|
||||
"type": "datapacks",
|
||||
"version": "1.18",
|
||||
"version": "1.21",
|
||||
"packs": {
|
||||
"survival": [
|
||||
"gameplay changes": [
|
||||
"graves",
|
||||
"multiplayer sleep"
|
||||
"multiplayer sleep",
|
||||
"armored elytra"
|
||||
],
|
||||
"items": ["armored elytra"]
|
||||
"teleport commands": ["tpa"]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -103,7 +108,7 @@ VANILLATWEAKS_FILE: /config/vt-datapacks.json,/config/vt-craftingtweaks.json,/co
|
||||
``` json title="ResourcePacks json"
|
||||
{
|
||||
"type": "resourcepacks",
|
||||
"version": "1.18",
|
||||
"version": "1.21",
|
||||
"packs": {
|
||||
"aesthetic": ["CherryPicking", "BlackNetherBricks", "AlternateBlockDestruction"]
|
||||
}
|
||||
@@ -114,7 +119,7 @@ VANILLATWEAKS_FILE: /config/vt-datapacks.json,/config/vt-craftingtweaks.json,/co
|
||||
``` json title="CraftingTweaks Json"
|
||||
{
|
||||
"type": "craftingtweaks",
|
||||
"version": "1.18",
|
||||
"version": "1.21",
|
||||
"packs": {
|
||||
"quality of life": [
|
||||
"dropper to dispenser",
|
||||
|
||||
@@ -22,22 +22,27 @@ The following formats are supported in the list of project-file references:
|
||||
- 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
|
||||
|
||||
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.
|
||||
!!! info "More about listing files"
|
||||
|
||||
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt" where the container file `/extras/cf-mods.txt` contains
|
||||
Each line in the listing file is processed as one of the references above; however, blank lines and comments that start with `#` are ignored.
|
||||
|
||||
Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it.
|
||||
|
||||
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt", assuming "/extras" has been added to `volumes` section, 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
|
||||
```
|
||||
|
||||
```text
|
||||
# This comment is ignored
|
||||
jei:10.2.1.1005
|
||||
|
||||
# This and previous blank line are ignore
|
||||
geckolib
|
||||
aquaculture
|
||||
naturalist
|
||||
```
|
||||
|
||||
!!! tip "Docker Compose"
|
||||
!!! tip "Multi-line values in 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
|
||||
|
||||
|
||||
@@ -16,14 +16,16 @@ On the left, there are sections describing some download automation options.
|
||||
|
||||
## Mods vs Plugins
|
||||
|
||||
The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins"
|
||||
The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins".
|
||||
|
||||
Typically, mods needs to be installed in both the client and server; however, there are some cases when only the server needs a mod. Plugins only need to be installed in the server and are never needed in the client.
|
||||
|
||||
## Optional plugins, mods, and config attach points
|
||||
|
||||
There are optional volume paths that can be attached to supply content to be copied into the data area:
|
||||
|
||||
`/plugins`
|
||||
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`.
|
||||
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`. If using a mod-based loader, such as Forge or Fabric, but a hybrid mod like [Cardboard](https://modrinth.com/mod/cardboard), then set `USES_PLUGINS` to have the automation utilize `/plugins` mount.
|
||||
|
||||
`/mods`
|
||||
: content in this directory is synchronized into `/data/mods` for server types that use mods, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_MODS_SRC` and destination by setting `COPY_MODS_DEST`.
|
||||
@@ -41,8 +43,28 @@ For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMO
|
||||
|
||||
These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive.
|
||||
|
||||
!!! information ""
|
||||
For more flexibility with mods/plugins preparation, you can declare other directories, files, and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list).
|
||||
!!! information "Multiple source directories"
|
||||
|
||||
`COPY_PLUGINS_SRC`, `COPY_MODS_SRC`, `COPY_CONFIG_SRC` can each be set to a comma or newline delimited list of container directories to reference.
|
||||
|
||||
For example, in a compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
# ...EULA, etc
|
||||
TYPE: PAPER
|
||||
# matches up to volumes declared below
|
||||
COPY_PLUGINS_SRC: /plugins-common,/plugins-local
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
# For example, reference a shared directory used by several projects
|
||||
- ../plugins-common:/plugins-common:ro
|
||||
# and add plugins unique to this project
|
||||
- ./plugins:/plugins-local:ro
|
||||
```
|
||||
|
||||
Alternatively, you can declare other directories along with files and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list).
|
||||
|
||||
|
||||
|
||||
## Zip file modpack
|
||||
@@ -78,9 +100,24 @@ If applying large generic packs, the update can be time-consuming. To skip the u
|
||||
|
||||
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".
|
||||
|
||||
To disable specific mods, which can be useful for conflicts between multiple generic packs, you can use the `GENERIC_PACKS_DISABLE_MODS` variable to specify mods to disable.
|
||||
|
||||
Disabling mods with docker run:
|
||||
```shell
|
||||
docker run -d -e GENERIC_PACKS_DISABLE_MODS="mod1.jar mod2.jar" ...
|
||||
```
|
||||
|
||||
Disabling mods within docker compose files:
|
||||
```yaml
|
||||
GENERIC_PACKS_DISABLE_MODS: |
|
||||
mod1.jar
|
||||
mod2.jar
|
||||
```
|
||||
|
||||
## Mods/plugins list
|
||||
|
||||
You may also download or copy over individual mods/plugins using the `MODS` or `PLUGINS` environment variables. Both are a comma or newline delimited list of
|
||||
|
||||
- URL of a jar file
|
||||
- container path to a jar file
|
||||
- container path to a directory containing jar files
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
|
||||
To select a datapack from a Modrinth project, prefix the entry with "datapack:". When running a vanilla server, this is optional since only datapacks will be available for vanilla servers to select.
|
||||
|
||||
| Description | Example projects entry |
|
||||
|---------------------------------|----------------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:PbVeub96` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
| Description | Example projects entry |
|
||||
|---------------------------------|-------------------------------------------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
|
||||
## Extra options
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
mkdocs-material == 9.5.48
|
||||
mkdocs-autorefs == 1.2.0
|
||||
mkdocstrings == 0.27.0
|
||||
mkdocs-literate-nav == 0.6.1
|
||||
mkdocs-material == 9.6.12
|
||||
mkdocs-autorefs == 1.4.1
|
||||
mkdocstrings[python] == 0.29.1
|
||||
mkdocs-literate-nav == 0.6.2
|
||||
mdx-gh-links == 0.4
|
||||
mkdocs-click == 0.8.1
|
||||
mkdocs-static-i18n == 1.2.3
|
||||
mkdocs-click == 0.9.0
|
||||
mkdocs-static-i18n == 1.3.0
|
||||
@@ -56,7 +56,9 @@ For example:
|
||||
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
|
||||
```
|
||||
|
||||
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.
|
||||
### Pinning modpack and mod loader versions
|
||||
|
||||
The latest modpack file and its associated mod loader will be located and installed by default on startup (including automatic upgrading of both on subsequent startups, if a later version is found on CurseForge). If a specific version is desired instead, 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
|
||||
- Set `CF_FILE_ID` to the numerical file ID
|
||||
@@ -82,6 +84,8 @@ The following examples all refer to version 1.0.7 of ATM8:
|
||||
CF_FILENAME_MATCHER: 1.0.7
|
||||
```
|
||||
|
||||
Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack.
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Bukkit/Spigot
|
||||
|
||||
!!! failure "GetBukkit site no longer supports automated downloads"
|
||||
|
||||
The downloads provider <https://getbukkit.org> seems to no longer support automated downloads. As such, it is highly recommended to switch to [Paper](paper.md) instead since it is actively maintained and fully compatible with Bukkit/Spigot plugins.
|
||||
|
||||
Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
|
||||
|
||||
!!! example
|
||||
|
||||
@@ -1,23 +1,57 @@
|
||||
Enable [Fabric server](https://fabricmc.net/) mode by adding a `-e TYPE=FABRIC` to your command-line.
|
||||
A [Fabric server](https://fabricmc.net/) can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "FABRIC"
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=FABRIC \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
!!! example
|
||||
|
||||
Using `docker run` command line
|
||||
|
||||
```
|
||||
docker run -d -e EULA=TRUE -e TYPE=FABRIC -p 25565:25565 itzg/minecraft-server
|
||||
```
|
||||
|
||||
In a compose file service:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
EULA: TRUE
|
||||
TYPE: FABRIC
|
||||
```
|
||||
|
||||
By default, the container will install the latest [fabric server launcher](https://fabricmc.net/use/server/), using the latest [fabric-loader](https://fabricmc.net/wiki/documentation:fabric_loader) against the minecraft version you have defined with `VERSION` (defaulting to the latest vanilla release of the game).
|
||||
|
||||
A specific loader or launcher version other than the latest can be requested using `FABRIC_LOADER_VERSION` and `FABRIC_LAUNCHER_VERSION` respectively, such as:
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data ... \
|
||||
-e TYPE=FABRIC \
|
||||
-e FABRIC_LAUNCHER_VERSION=0.10.2 \
|
||||
-e FABRIC_LOADER_VERSION=0.13.1
|
||||
```
|
||||
!!! example "Using launcher and loader versions"
|
||||
|
||||
!!! note
|
||||
With docker run
|
||||
|
||||
```
|
||||
docker run -d ... \
|
||||
-e TYPE=FABRIC \
|
||||
-e FABRIC_LAUNCHER_VERSION=0.10.2 \
|
||||
-e FABRIC_LOADER_VERSION=0.13.1
|
||||
```
|
||||
|
||||
In a compose file service:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
EULA: TRUE
|
||||
TYPE: FABRIC
|
||||
FABRIC_LAUNCHER_VERSION: 0.10.2
|
||||
FABRIC_LOADER_VERSION: 0.13.1
|
||||
```
|
||||
|
||||
!!! note "Fabric API"
|
||||
|
||||
As [mentioned on the Fabric download page](https://fabricmc.net/use/installer/), most mods will require the Fabric API mod to be installed. That can be easily done by utilizing [the Modrinth downloads feature](../../mods-and-plugins/modrinth.md), such as adding this to the `environment` of a compose file service:
|
||||
|
||||
```yaml
|
||||
TYPE: FABRIC
|
||||
MODRINTH_PROJECTS: |
|
||||
fabric-api
|
||||
```
|
||||
|
||||
!!! note "Alternate launcher"
|
||||
|
||||
If you wish to use an alternative launcher you can:
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded, upgraded, and run by setting the environment variable `TYPE` to "FORGE".
|
||||
|
||||
!!! note "A note from the installer"
|
||||
|
||||
> Please do not automate the download and installation of Forge.
|
||||
Our efforts are supported by ads from the download page.
|
||||
If you MUST automate this, please consider supporting the project through <https://www.patreon.com/LexManos/>
|
||||
|
||||
Since my project also relies on donations, please pass it along and consider contributing to the Patreon above.
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
@@ -14,6 +22,7 @@ A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded
|
||||
|
||||
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".
|
||||
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
@@ -55,3 +64,22 @@ Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge serv
|
||||
VERSION: "1.20.4"
|
||||
NEOFORGE_VERSION: "beta"
|
||||
```
|
||||
|
||||
### Cleanroom
|
||||
|
||||
[Cleanroom](https://github.com/CleanroomMC/Cleanroom) isn't fully automated, but can be utilized by...
|
||||
|
||||
1. choose the desired release at https://github.com/CleanroomMC/Cleanroom/releases
|
||||
2. grab the link to the `*-installer.jar` file in that release
|
||||
3. with `TYPE` set to "FORGE", set `FORGE_INSTALLER_URL` to the installer jar's link
|
||||
|
||||
!!! example
|
||||
|
||||
In docker compose `environment`
|
||||
|
||||
```yaml
|
||||
TYPE: FORGE
|
||||
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
|
||||
```
|
||||
|
||||
[Full example](https://github.com/itzg/docker-minecraft-server/tree/master/examples/cleanroom)
|
||||
@@ -6,6 +6,8 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
||||
|
||||
!!! example
|
||||
|
||||
Using `docker run` command line
|
||||
|
||||
```
|
||||
docker run ... -e TYPE=PAPER ...
|
||||
|
||||
@@ -15,6 +17,26 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
||||
|
||||
docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ...
|
||||
```
|
||||
|
||||
Using a compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: PAPER
|
||||
```
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: PAPER
|
||||
VERSION: 1.20.6
|
||||
PAPER_BUILD: 140
|
||||
```
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: PAPER
|
||||
PAPER_CHANNEL: experimental
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
|
||||
@@ -10,24 +10,29 @@ or explicitly include the tag, such as
|
||||
|
||||
where `<tag>` refers to the first column of this table:
|
||||
|
||||
| Tag | Java version | Linux | JVM Type | Architecture |
|
||||
|------------------|--------------|--------|--------------------|---------------------|
|
||||
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 |
|
||||
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 |
|
||||
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
|
||||
| Tag | Java version | Linux | JVM Type | Architecture | Note |
|
||||
|------------------|--------------|--------|--------------------|---------------------|------|
|
||||
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| java24 | 24 | Ubuntu | Hotspot | amd64, arm64 | (2) |
|
||||
| java24-graalvm | 24 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (2) |
|
||||
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
||||
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) | |
|
||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 | |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 | |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 | |
|
||||
|
||||
Notes
|
||||
|
||||
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.
|
||||
2. Short-term variant, subject to deprecation upon next version introduction
|
||||
3. 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.
|
||||
|
||||
!!! example "Example using java8"
|
||||
|
||||
@@ -121,17 +126,17 @@ Forge also doesn't support openj9 JVM implementation.
|
||||
|
||||
The following image tags have been deprecated and are no longer receiving updates:
|
||||
|
||||
- java19
|
||||
- adopt13
|
||||
- adopt14
|
||||
- adopt15
|
||||
- openj9-nightly
|
||||
- multiarch-latest
|
||||
- java11
|
||||
- java16/java16-openj9
|
||||
- java17-graalvm-ce
|
||||
- java17-openj9
|
||||
- java19
|
||||
- java20-graalvm, java20, java20-alpine
|
||||
- java23-*
|
||||
- java8-multiarch is still built and pushed, but please move to java8 instead
|
||||
- java8-alpine
|
||||
|
||||
[^1]: Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise.
|
||||
@@ -4,7 +4,10 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# from .env
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
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
|
||||
|
||||
@@ -8,7 +8,10 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: all-the-mods-10
|
||||
# Optional: select a specific version/file
|
||||
|
||||
@@ -6,7 +6,10 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||
# CF_FILENAME_MATCHER: "1.1.0"
|
||||
|
||||
@@ -6,7 +6,10 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
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
|
||||
|
||||
@@ -4,7 +4,10 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_MODPACK_MANIFEST: /manifests/manifest.json
|
||||
CF_SLUG: "custom"
|
||||
|
||||
@@ -6,40 +6,12 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
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
|
||||
|
||||
@@ -7,11 +7,13 @@ services:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: PAPER
|
||||
ENABLE_AUTOPAUSE: "TRUE"
|
||||
MAX_TICK_TIME: "-1"
|
||||
# More aggressive settings for demo purposes
|
||||
AUTOPAUSE_TIMEOUT_INIT: "30"
|
||||
AUTOPAUSE_TIMEOUT_EST: "10"
|
||||
JVM_DD_OPTS: "disable.watchdog:true"
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
@@ -4,7 +4,10 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: better-mc-fabric-bmc1
|
||||
# CF_FILENAME_MATCHER: v18.5
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: MODRINTH
|
||||
MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v32.5
|
||||
MODRINTH_EXCLUDE_FILES: |
|
||||
XaeroPlus
|
||||
XaerosWorldMap
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/citresewn-*.jar
|
||||
**/datapacks/BE_default_endgen_fix*
|
||||
MODRINTH_FORCE_SYNCHRONIZE: true
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
# declare /data volume mapping as desired
|
||||
# volumes:
|
||||
# - ./data:/data
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: MODRINTH
|
||||
# NOTE: v36 doesn't startup correctly
|
||||
MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v34.5
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
config/paxi/datapacks/BE_default_endgen_fix*
|
||||
MODRINTH_FORCE_SYNCHRONIZE: true
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
# or use a host directory binding
|
||||
# - ./data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
13
examples/canyon/compose.yml
Normal file
13
examples/canyon/compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: canyon
|
||||
VERSION: b1.7.3
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
15
examples/cleanroom/compose.yml
Normal file
15
examples/cleanroom/compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Provides an example of running CleanroomMC from https://github.com/CleanroomMC/Cleanroom,
|
||||
# which is a Forge fork
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: FORGE
|
||||
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -9,10 +9,14 @@ services:
|
||||
EULA: true
|
||||
ALLOW_FLIGHT: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: craftoria
|
||||
MEMORY: 8G
|
||||
# TODO: replace with slugs and see if already excluded by cf-exclude-include.json
|
||||
CF_EXCLUDE_MODS: |
|
||||
737481
|
||||
363363
|
||||
|
||||
@@ -4,7 +4,10 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: FORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
VERSION: 1.19.2
|
||||
CURSEFORGE_FILES: |
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FABRIC
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- fabric:/data
|
||||
|
||||
volumes:
|
||||
fabric: {}
|
||||
@@ -12,7 +12,10 @@ services:
|
||||
CURSEFORGE_FILES: |
|
||||
fabric-api
|
||||
chunky-pregenerator
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
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.
|
||||
|
||||
20
examples/fabric-cardboard/compose.yml
Normal file
20
examples/fabric-cardboard/compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:latest
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "FABRIC"
|
||||
MEMORY: 4G
|
||||
MODRINTH_PROJECTS: |
|
||||
fabric-api
|
||||
cardboard:beta
|
||||
USES_PLUGINS: true
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./plugins:/plugins:ro
|
||||
volumes:
|
||||
mc-data:
|
||||
20
examples/fabric/compose.yml
Normal file
20
examples/fabric/compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FABRIC
|
||||
# VERSION: 1.21.4
|
||||
# FABRIC_INSTALLER_VERSION: 1.0.1
|
||||
# FABRIC_LOADER_VERSION: 0.16.10
|
||||
# Since Fabric server type only includes the loader, most times
|
||||
# the fabric-api is required for other mods to function
|
||||
MODRINTH_PROJECTS: |
|
||||
fabric-api
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- fabric:/data
|
||||
|
||||
volumes:
|
||||
fabric: {}
|
||||
@@ -9,6 +9,10 @@ services:
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: AUTO_CURSEFORGE
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/ftb-evolution
|
||||
# This modpack includes an override client-side only mod that will prevent the server from starting.
|
||||
|
||||
25
examples/gtnh/docker-compose.yaml
Normal file
25
examples/gtnh/docker-compose.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
mc:
|
||||
# make sure this java version matches with pack java version
|
||||
image: itzg/minecraft-server:java21
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: CUSTOM
|
||||
GENERIC_PACKS: GT_New_Horizons_2.7.2_Server_Java_17-21
|
||||
GENERIC_PACKS_SUFFIX: .zip
|
||||
GENERIC_PACKS_PREFIX: https://downloads.gtnewhorizons.com/ServerPacks/
|
||||
# if this isn't true, then the container tries to download the modpack every run
|
||||
SKIP_GENERIC_PACK_UPDATE_CHECK: "true"
|
||||
MEMORY: 6G
|
||||
# Make sure that this matches what is in your pack's startserver bash file
|
||||
JVM_OPTS: -Dfml.readTimeout=180 @java9args.txt
|
||||
CUSTOM_JAR_EXEC: -jar lwjgl3ify-forgePatches.jar nogui
|
||||
volumes:
|
||||
# attach a managed volume, change to a relative or absolute host directory if needed
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -5,6 +5,10 @@ services:
|
||||
EULA: true
|
||||
TYPE: KETTING
|
||||
VERSION: 1.20.1
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: "${CF_API_KEY}"
|
||||
CURSEFORGE_FILES: https://www.curseforge.com/minecraft/mc-mods/aquaculture
|
||||
ports:
|
||||
|
||||
@@ -1,12 +1,30 @@
|
||||
# Lazymc requires that the minecraft server have a static IP.
|
||||
#
|
||||
# To ensure that our servers have a static IP we need to create
|
||||
# a network for our services to use.
|
||||
#
|
||||
# By default, Docker uses 172.17.0.0/16 subnet range.
|
||||
# So we need to create a new network in a different subnet
|
||||
# See the readme for more information.
|
||||
#
|
||||
# Please ensure that the subnet falls within the private CIDRs:
|
||||
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
|
||||
#
|
||||
# And that it is not in use by anything else.
|
||||
networks:
|
||||
minecraft-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.18.0.0/16
|
||||
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
# the IPs should start at .2 as .1 is reserved for the gateway
|
||||
networks:
|
||||
minecraft-network:
|
||||
ipv4_address: 172.18.0.2
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
@@ -21,11 +39,19 @@ services:
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# Assign a static IP to the server container
|
||||
networks:
|
||||
minecraft-network:
|
||||
ipv4_address: 172.18.0.3
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
# Set lazymc.enabled to true to enable lazymc on this container
|
||||
- lazymc.enabled=true
|
||||
# Required to find the container to manage it
|
||||
- lazymc.group=mc
|
||||
# Point to the service name of the Minecraft server
|
||||
- lazymc.server.address=mc:25565
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MOTD: |
|
||||
line one
|
||||
A §l§cMinecraft§r server
|
||||
line two
|
||||
# or
|
||||
# MOTD: "line one\nline two"
|
||||
|
||||
@@ -6,7 +6,10 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# CF_API_KEY=... must be set in .env file or as environment variable
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: one-block-modded
|
||||
# Modpack client zip must be manually downloaded from
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: PAPER
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
- mc-data:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
mc-data: {}
|
||||
@@ -6,7 +6,11 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: the-pixelmon-modpack
|
||||
CF_FILENAME_MATCHER: "9.1.2"
|
||||
MEMORY: 4G
|
||||
|
||||
@@ -6,7 +6,10 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg
|
||||
CF_FILENAME_MATCHER: "2.8.7"
|
||||
|
||||
@@ -7,23 +7,20 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons-2
|
||||
# Optional: select a specific version/file
|
||||
#CF_FILENAME_MATCHER: "0.2.34"
|
||||
CF_EXCLUDE_MODS: |
|
||||
controlling
|
||||
craftpresence
|
||||
creative-core
|
||||
default-options
|
||||
equipment-compare
|
||||
item-borders
|
||||
itemphysic-lite
|
||||
konkrete
|
||||
oauth
|
||||
sound-filters
|
||||
toast-control
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
|
||||
@@ -4,7 +4,10 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: rlcraft
|
||||
CF_FILENAME_MATCHER: 2.9.3
|
||||
|
||||
22
examples/skyfactory5/compose.yml
Normal file
22
examples/skyfactory5/compose.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
# https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/6044634
|
||||
CF_SLUG: skyfactory-5
|
||||
CF_FILENAME_MATCHER: 5.0.2
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -6,7 +6,11 @@ services:
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560
|
||||
MEMORY: 4G
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:java17
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
# and set in .env file making sure to double up dollar signs, such as
|
||||
# CF_API_KEY=$$2a$$10$$....
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: vault-hunters-1-18-2
|
||||
CF_FILENAME_MATCHER: "Update-10.0.0"
|
||||
MOTD: "§4----- §2 Vault Hunters: 1.18.2u10.0.0 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
|
||||
MOTD: "§4----- §2 Vault Hunters: 1.18.2 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
|
||||
MEMORY: 6G # 4G for base server + 2G per player
|
||||
CF_EXCLUDE_MODS: reauth
|
||||
ALLOW_FLIGHT: true
|
||||
ENABLE_COMMAND_BLOCK: true
|
||||
DIFFICULTY: hard
|
||||
@@ -19,4 +21,4 @@ services:
|
||||
- mc-data:/data
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
mc-data: {}
|
||||
|
||||
@@ -24,14 +24,31 @@ use_proxy() {
|
||||
fi
|
||||
}
|
||||
|
||||
use_server_list_ping() {
|
||||
if [[ "${VERSION^^}" == "LATEST" || "${VERSION^^}" == "SNAPSHOT" ]]; then
|
||||
# Don't use server-list ping for unknown version
|
||||
return 1
|
||||
fi
|
||||
|
||||
if versionLessThan 1.7; then
|
||||
echo "--use-server-list-ping"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
mc_server_listening() {
|
||||
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --timeout 10s >&/dev/null
|
||||
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" $(use_server_list_ping) --timeout 10s >&/dev/null
|
||||
}
|
||||
|
||||
java_clients_connections() {
|
||||
local connections
|
||||
if java_running; then
|
||||
if ! connections=$(mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --show-player-count); then
|
||||
if ! connections=$(mc-monitor status \
|
||||
--host "${SERVER_HOST:-localhost}" \
|
||||
--port "$SERVER_PORT" \
|
||||
--retry-limit "${AUTOPAUSE_STATUS_RETRY_LIMIT:-10}" --retry-interval "${AUTOPAUSE_STATUS_RETRY_INTERVAL:-2s}" \
|
||||
$(use_proxy) $(use_server_list_ping) \
|
||||
--show-player-count); then
|
||||
# consider it a non-zero player count if the ping fails
|
||||
# otherwise a laggy server with players connected could get paused
|
||||
connections=1
|
||||
@@ -44,4 +61,4 @@ java_clients_connections() {
|
||||
|
||||
java_clients_connected() {
|
||||
(( $(java_clients_connections) > 0 ))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,10 @@
|
||||
"cherished-worlds",
|
||||
"chunk-animator",
|
||||
"clickable-advancements",
|
||||
"compass-coords",
|
||||
"configured",
|
||||
"controlling",
|
||||
"craftpresence",
|
||||
"ctm",
|
||||
"custom-main-menu",
|
||||
"dark-mode-everywhere",
|
||||
@@ -44,6 +46,7 @@
|
||||
"entity-collision-fps-fix",
|
||||
"entity-texture-features-fabric",
|
||||
"entityculling",
|
||||
"equipment-compare",
|
||||
"extreme-sound-muffler",
|
||||
"ezzoom",
|
||||
"fading-night-vision",
|
||||
@@ -61,6 +64,8 @@
|
||||
"inmisaddon",
|
||||
"iris-flywheel-compat",
|
||||
"irisshaders",
|
||||
"item-borders",
|
||||
"item-highlighter",
|
||||
"item-obliterator",
|
||||
"itemphysic-lite",
|
||||
"itemzoom",
|
||||
@@ -68,7 +73,6 @@
|
||||
"just-enough-mekanism-multiblocks",
|
||||
"just-enough-resources-jer",
|
||||
"just-zoom",
|
||||
"konkrete",
|
||||
"legendary-tooltips",
|
||||
"lighty",
|
||||
"loot-capacitor-tooltips",
|
||||
@@ -110,6 +114,8 @@
|
||||
"sodium-extra",
|
||||
"sodium-options-api",
|
||||
"sodium-rubidium-occlusion-culling-fix",
|
||||
"sound",
|
||||
"sound-reloader",
|
||||
"sound-filters",
|
||||
"sound-physics-remastered",
|
||||
"stellar-sky",
|
||||
@@ -125,6 +131,7 @@
|
||||
"vanillafix",
|
||||
"visuality",
|
||||
"waila-harvestability",
|
||||
"wawla",
|
||||
"xaeroplus",
|
||||
"yungs-menu-tweaks",
|
||||
"zume"
|
||||
@@ -133,11 +140,18 @@
|
||||
"all-of-fabric-6": {
|
||||
"forceIncludes": ["revelationary"]
|
||||
},
|
||||
"valhelsia-5": {
|
||||
"excludes": ["modernfix"]
|
||||
},
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": ["just-enough-resources-jer"]
|
||||
},
|
||||
"skyfactory-5": {
|
||||
"forceIncludes": [
|
||||
"colored-torches",
|
||||
"dye-mob-dye",
|
||||
"openstairs"
|
||||
]
|
||||
},
|
||||
"valhelsia-5": {
|
||||
"excludes": ["modernfix"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN" packages="com.mojang.util">
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="SysOut" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
@@ -34,4 +34,4 @@
|
||||
<AppenderRef ref="TerminalConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
</Configuration>
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
"cherishedworlds",
|
||||
"citresewn",
|
||||
"clickadv",
|
||||
"compass-coords",
|
||||
"connectedness",
|
||||
"connector",
|
||||
"craftpresence",
|
||||
"cwb",
|
||||
"DisableCustomWorldsAdvice",
|
||||
"drippyloadingscreen",
|
||||
"eating-animation",
|
||||
@@ -36,6 +40,8 @@
|
||||
"fancymenu",
|
||||
"fast-ip-ping",
|
||||
"FauxCustomEntityData",
|
||||
"feytweaks",
|
||||
"figura",
|
||||
"GeckoLibIrisCompat",
|
||||
"gpumemleakfix",
|
||||
"Highlighter",
|
||||
@@ -60,9 +66,11 @@
|
||||
"PickUpNotifier",
|
||||
"PresenceFootsteps",
|
||||
"Prism",
|
||||
"reforgium",
|
||||
"reeses_sodium_options",
|
||||
"ResourcePackOverrides",
|
||||
"ryoamiclights",
|
||||
"screenshot_viewer",
|
||||
"Searchables",
|
||||
"seasonhud",
|
||||
"ShoulderSurfing",
|
||||
@@ -73,8 +81,9 @@
|
||||
"VR-Combat",
|
||||
"YeetusExperimentus",
|
||||
"yungsmenutweaks",
|
||||
"Zoomify"
|
||||
"Zoomify",
|
||||
"zume"
|
||||
],
|
||||
"globalForceIncludes": [],
|
||||
"modpacks": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if isTrue "${SKIP_CHOWN_DATA}" || [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
||||
if isFalse "${SKIP_CHOWN_DATA}" && [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
||||
log "Changing ownership of /data to $UID ..."
|
||||
chown -R ${runAsUser}:${runAsGroup} /data
|
||||
fi
|
||||
|
||||
@@ -32,6 +32,7 @@ isDebugging && set -x
|
||||
export HOME=/data
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
log "Image info: $(paste -d, -s /etc/image.properties)"
|
||||
|
||||
if [ ! -e /data/eula.txt ]; then
|
||||
if ! isTrue "$EULA"; then
|
||||
|
||||
@@ -18,10 +18,10 @@ githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
|
||||
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
|
||||
|
||||
buildRelPath=$(
|
||||
jq '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
|
||||
jq -r '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
|
||||
)
|
||||
buildNumber=$(
|
||||
jq '.number'<<< "$canyonBuildJSON"
|
||||
jq -r '.number'<<< "$canyonBuildJSON"
|
||||
)
|
||||
baseName=$(basename "${buildRelPath}")
|
||||
|
||||
@@ -50,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
|
||||
fi
|
||||
curl -fsSL -o "$SERVER" "$downloadUrl"
|
||||
if [ ! -f "$SERVER" ]; then
|
||||
logError "Failed to download from $downloadUrl (status=$?)"
|
||||
logError "Failed to download from $downloadUrl"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -106,6 +106,7 @@ export VERSION
|
||||
|
||||
variants=(
|
||||
run.sh
|
||||
fabric-server-launch.jar
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}-universal.jar"
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}-${mcVersion}-universal.jar"
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}-server-launch.jar"
|
||||
|
||||
@@ -21,6 +21,20 @@ if [[ ${FORGE_INSTALLER} ]]; then
|
||||
logError "Failed to installForge given installer ${FORGE_INSTALLER}"
|
||||
exit 1
|
||||
fi
|
||||
elif [[ ${FORGE_INSTALLER_URL:-} ]]; then
|
||||
mkdir -p tmp
|
||||
if ! installer=$(get -o tmp --output-filename "${FORGE_INSTALLER_URL}"); then
|
||||
logError "Failed to download installer from $FORGE_INSTALLER_URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm $installer" EXIT
|
||||
|
||||
if ! mc-image-helper-forge --forge-installer="${installer}" ; then
|
||||
logError "Failed to install forge from ${FORGE_INSTALLER_URL}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if ! mc-image-helper-forge --forge-version="${FORGE_VERSION}"; then
|
||||
logError "Failed to install Forge"
|
||||
|
||||
@@ -17,12 +17,12 @@ export SERVER
|
||||
|
||||
resolveVersion
|
||||
|
||||
EXTRA_ARGS+="-minecraftVersion $VERSION"
|
||||
EXTRA_ARGS+=" -minecraftVersion $VERSION"
|
||||
if [[ ${KETTING_VERSION:-} ]]; then
|
||||
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
|
||||
EXTRA_ARGS+=" -kettingVersion $KETTING_VERSION"
|
||||
fi
|
||||
if [[ ${FORGE_VERSION:-} ]]; then
|
||||
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
|
||||
EXTRA_ARGS+=" -forgeVersion $FORGE_VERSION"
|
||||
fi
|
||||
export EXTRA_ARGS
|
||||
|
||||
|
||||
@@ -9,39 +9,46 @@ isDebugging && set -x
|
||||
resolveVersion
|
||||
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
mohistBaseUrl=https://ci.codemc.io/job/MohistMC/
|
||||
mohistJobs=${mohistBaseUrl}job/
|
||||
mohistJob=${mohistJobs}Mohist-${VERSION}/
|
||||
mohistBaseUrl="https://mohistmc.com/api/v2/projects/mohist/"
|
||||
mohistApiUrl="${mohistBaseUrl}${VERSION}/builds/"
|
||||
|
||||
function logMohistAvailableVerisons(){
|
||||
logError " check ${mohistBaseUrl} for available versions"
|
||||
logError " and set VERSION accordingly"
|
||||
}
|
||||
|
||||
if ! get --exists "${mohistJob}"; then
|
||||
if ! get --exists "${mohistApiUrl}"; then
|
||||
logError "Mohist builds do not exist for ${VERSION}"
|
||||
logMohistAvailableVerisons
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRelPath=$(
|
||||
get --json-path '$.artifacts[0].relativePath' "${mohistJob}${MOHIST_BUILD}/api/json"
|
||||
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
|
||||
# Get the latest build number from the API
|
||||
buildNumber=$(
|
||||
get --json-path '$.builds[-1].number' "${mohistApiUrl}"
|
||||
)
|
||||
MOHIST_BUILD="${buildNumber}"
|
||||
fi
|
||||
|
||||
downloadUrl=$(
|
||||
get --json-path "$.builds[?(@.number==${MOHIST_BUILD})].url" "${mohistApiUrl}"
|
||||
)
|
||||
|
||||
baseName=$(basename "${buildRelPath}")
|
||||
if [[ ${baseName} != *-server.jar* ]]; then
|
||||
logError "Mohist build for ${VERSION} is not a valid server jar, found ${baseName}"
|
||||
if [[ -z "${downloadUrl}" ]]; then
|
||||
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
|
||||
logMohistAvailableVerisons
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER="/data/${baseName}"
|
||||
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
|
||||
|
||||
if [ ! -f "${SERVER}" ]; then
|
||||
log "Downloading ${baseName}"
|
||||
get -o "${SERVER}" "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
|
||||
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
|
||||
get -o "${SERVER}" "${downloadUrl}"
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
export SERVER
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -42,11 +42,18 @@ else
|
||||
applyResultsFile ${resultsFile}
|
||||
fi
|
||||
|
||||
# Download default configs to allow for consistent patching
|
||||
for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
|
||||
DOWNLOAD_DEFAULT_CONFIGS+=",${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/$c"
|
||||
done
|
||||
export DOWNLOAD_DEFAULT_CONFIGS
|
||||
defaultTopLevelConfigs="bukkit.yml spigot.yml"
|
||||
if versionLessThan 1.19; then
|
||||
defaultTopLevelConfigs+=" paper.yml"
|
||||
else
|
||||
# Download default configs to allow for consistent patching
|
||||
DOWNLOAD_DEFAULT_CONFIGS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" paper-global.yml paper-world-defaults.yml)
|
||||
export DOWNLOAD_DEFAULT_CONFIGS
|
||||
fi
|
||||
|
||||
# Download top-level configs to allow for consistent patching
|
||||
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" $defaultTopLevelConfigs)
|
||||
export DOWNLOAD_DEFAULTS
|
||||
|
||||
# Normalize on Spigot for downstream operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
@@ -41,8 +41,13 @@ if [[ "$DATAPACKS" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
elif [[ -d "$i" ]]; then
|
||||
log "Copying datapacks from $i ..."
|
||||
cp "$i"/*.zip "${out_dir}"
|
||||
if [[ -f "$i/pack.mcmeta" ]]; then
|
||||
log "Copying datapack from $i"
|
||||
cp -r "$i" "${out_dir}"
|
||||
else
|
||||
log "Copying datapacks from $i ..."
|
||||
cp "$i"/*.zip "${out_dir}"
|
||||
fi
|
||||
else
|
||||
logError "Invalid URL or path given in DATAPACKS: $i"
|
||||
exit 2
|
||||
|
||||
@@ -36,6 +36,15 @@ if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
|
||||
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
|
||||
fi
|
||||
fi
|
||||
if [[ $DOWNLOAD_DEFAULTS ]]; then
|
||||
log "Downloading default top-level configs, if needed"
|
||||
if ! mc-image-helper mcopy \
|
||||
--to /data \
|
||||
--skip-existing --skip-up-to-date=false \
|
||||
"$DOWNLOAD_DEFAULTS" 2> /dev/null; then
|
||||
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${PATCH_DEFINITIONS} ]]; then
|
||||
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
|
||||
|
||||
@@ -155,6 +155,7 @@ function handleGenericPacks() {
|
||||
: "${GENERIC_PACKS:=${GENERIC_PACK}}"
|
||||
: "${GENERIC_PACKS_PREFIX:=}"
|
||||
: "${GENERIC_PACKS_SUFFIX:=}"
|
||||
: "${GENERIC_PACKS_DISABLE_MODS:=}"
|
||||
|
||||
if [[ "${GENERIC_PACKS}" ]]; then
|
||||
IFS=',' read -ra packs <<< "${GENERIC_PACKS}"
|
||||
@@ -192,6 +193,12 @@ function handleGenericPacks() {
|
||||
extract "${pack}" "${base_dir}"
|
||||
done
|
||||
|
||||
# Disable mods
|
||||
for mod in ${GENERIC_PACKS_DISABLE_MODS}; do
|
||||
log Disabling $mod
|
||||
find "${base_dir}" -name "$mod" -exec mv {} {}.disabled -v \;
|
||||
done
|
||||
|
||||
# Remove any eula file since container manages it
|
||||
rm -f "${base_dir}/eula.txt"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ function mc-image-helper-mounts(){
|
||||
: "${COPY_PLUGINS_SRC:="/plugins"}"
|
||||
: "${COPY_PLUGINS_DEST:=${PLUGINS_OUT_DIR}}"
|
||||
|
||||
if usesPlugins && [ -d "${COPY_PLUGINS_SRC}" ]; then
|
||||
if usesPlugins; then
|
||||
mkdir -p "${COPY_PLUGINS_DEST}"
|
||||
log "Copying any plugins from ${COPY_PLUGINS_SRC} to ${COPY_PLUGINS_DEST}"
|
||||
mc-image-helper-mounts "${COPY_PLUGINS_SRC}" "${COPY_PLUGINS_DEST}"
|
||||
@@ -47,7 +47,7 @@ fi
|
||||
: "${COPY_MODS_SRC:="/mods"}"
|
||||
: "${COPY_MODS_DEST:=${MODS_OUT_DIR}}"
|
||||
|
||||
if usesMods && [ -d "${COPY_MODS_SRC}" ]; then
|
||||
if usesMods; then
|
||||
log "Copying any mods from ${COPY_MODS_SRC} to ${COPY_MODS_DEST}"
|
||||
mc-image-helper-mounts "${COPY_MODS_SRC}" "${COPY_MODS_DEST}"
|
||||
fi
|
||||
@@ -55,9 +55,7 @@ fi
|
||||
: "${COPY_CONFIG_SRC:="/config"}"
|
||||
: "${COPY_CONFIG_DEST:="/data/config"}"
|
||||
|
||||
if [ -d "${COPY_CONFIG_SRC}" ]; then
|
||||
log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}"
|
||||
mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}"
|
||||
fi
|
||||
log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}"
|
||||
mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupServerProperties" "$@"
|
||||
|
||||
@@ -77,13 +77,18 @@ if [[ -v WHITELIST_FILE ]]; then
|
||||
fi
|
||||
if [[ -v WHITELIST ]]; then
|
||||
args=()
|
||||
if isTrue "${APPEND_WHITELIST:-false}" || isFalse "${OVERRIDE_WHITELIST:-true}"; then
|
||||
args+=(--append-only)
|
||||
fi
|
||||
existing="$EXISTING_WHITELIST_FILE"
|
||||
if [[ "$EXISTING_WHITELIST_FILE" = SYNC_FILE_MERGE_LIST ]]; then
|
||||
existing=MERGE
|
||||
fi
|
||||
# legacy option
|
||||
if [[ -v APPEND_WHITELIST ]] && isTrue "${APPEND_WHITELIST}"; then
|
||||
existing=MERGE
|
||||
fi
|
||||
# legacy option
|
||||
if [[ -v OVERRIDE_WHITELIST ]] && isFalse "${OVERRIDE_WHITELIST}"; then
|
||||
existing=SKIP
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
mc-image-helper manage-users \
|
||||
"${sharedArgs[@]}" "${args[@]}" \
|
||||
|
||||
@@ -464,21 +464,33 @@ function checkSum() {
|
||||
}
|
||||
|
||||
function usesMods() {
|
||||
case "$FAMILY" in
|
||||
FORGE | FABRIC | HYBRID | SPONGE)
|
||||
if isTrue "${USES_MODS:-}"; then
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
|
||||
else
|
||||
case "$FAMILY" in
|
||||
FORGE | FABRIC | HYBRID | SPONGE)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
function usesPlugins() {
|
||||
case "$FAMILY" in
|
||||
SPIGOT | HYBRID)
|
||||
if isTrue "${USES_PLUGINS:-}"; then
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
|
||||
else
|
||||
case "$FAMILY" in
|
||||
SPIGOT | HYBRID)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
function resolveVersion() {
|
||||
@@ -513,3 +525,17 @@ function ensureRemoveAllModsOff() {
|
||||
REMOVE_OLD_MODS=false
|
||||
fi
|
||||
}
|
||||
|
||||
function buildDownloadList() {
|
||||
repoUrl=${1?}
|
||||
version=${2?}
|
||||
shift 2
|
||||
result=
|
||||
for c in "${@}"; do
|
||||
if [[ $result ]]; then
|
||||
result+=","
|
||||
fi
|
||||
result+="${repoUrl}/${version}/$c"
|
||||
done
|
||||
echo "$result"
|
||||
}
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
EULA: "true"
|
||||
SETUP_ONLY: "true"
|
||||
TYPE: FABRIC
|
||||
VERSION: 1.19.1
|
||||
VERSION: 1.21.4
|
||||
MODRINTH_PROJECTS: fabric-api,cloth-config
|
||||
volumes:
|
||||
- ./data:/data
|
||||
|
||||
Reference in New Issue
Block a user