mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-19 15:56:24 +00:00
Compare commits
39 Commits
itzg-patch
...
itzg-patch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
855b664e47 | ||
|
|
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 | ||
|
|
1f6288efd8 | ||
|
|
787a31a5f1 | ||
|
|
66a6df4029 | ||
|
|
de19794a5f | ||
|
|
0582a8ab97 | ||
|
|
94def951b6 | ||
|
|
755f1c5352 | ||
|
|
4804c4bb67 | ||
|
|
58302f9490 |
8
.github/workflows/build-multiarch.yml
vendored
8
.github/workflows/build-multiarch.yml
vendored
@@ -128,13 +128,13 @@ jobs:
|
|||||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.7.1
|
uses: docker/setup-buildx-action@v3.8.0
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3.2.0
|
uses: docker/setup-qemu-action@v3.3.0
|
||||||
|
|
||||||
- name: Build for test
|
- name: Build for test
|
||||||
uses: docker/build-push-action@v6.10.0
|
uses: docker/build-push-action@v6.12.0
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: ${{ env.IMAGE_TO_TEST }}
|
tags: ${{ env.IMAGE_TO_TEST }}
|
||||||
@@ -172,7 +172,7 @@ jobs:
|
|||||||
password: ${{ github.token }}
|
password: ${{ github.token }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6.10.0
|
uses: docker/build-push-action@v6.12.0
|
||||||
if: github.actor == github.repository_owner
|
if: github.actor == github.repository_owner
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
|
|||||||
6
.github/workflows/verify-pr.yml
vendored
6
.github/workflows/verify-pr.yml
vendored
@@ -53,10 +53,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.7.1
|
uses: docker/setup-buildx-action@v3.8.0
|
||||||
|
|
||||||
- name: Confirm multi-arch build
|
- name: Confirm multi-arch build
|
||||||
uses: docker/build-push-action@v6.10.0
|
uses: docker/build-push-action@v6.12.0
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
# ensure latest base image is used
|
# ensure latest base image is used
|
||||||
@@ -66,7 +66,7 @@ jobs:
|
|||||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||||
|
|
||||||
- name: Build for test
|
- name: Build for test
|
||||||
uses: docker/build-push-action@v6.10.0
|
uses: docker/build-push-action@v6.12.0
|
||||||
with:
|
with:
|
||||||
# Only build single platform since loading multi-arch image into daemon fails with
|
# Only build single platform since loading multi-arch image into daemon fails with
|
||||||
# "docker exporter does not currently support exporting manifest lists"
|
# "docker exporter does not currently support exporting manifest lists"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
--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
|
--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.40.11
|
||||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
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
|
# used for cache busting local copy of mc-image-helper
|
||||||
ARG MC_HELPER_REV=1
|
ARG MC_HELPER_REV=1
|
||||||
@@ -64,7 +64,7 @@ WORKDIR /data
|
|||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
# End user MUST set EULA and change RCON_PASSWORD
|
# End user MUST set EULA and change RCON_PASSWORD
|
||||||
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000
|
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
COPY --chmod=755 scripts/start* /
|
COPY --chmod=755 scripts/start* /
|
||||||
COPY --chmod=755 bin/ /usr/local/bin/
|
COPY --chmod=755 bin/ /usr/local/bin/
|
||||||
|
|||||||
@@ -10,10 +10,12 @@
|
|||||||
|
|
||||||
There you will find things like
|
There you will find things like
|
||||||
- [Quick start with Docker Compose](https://docker-minecraft-server.readthedocs.io/en/latest/#using-docker-compose)
|
- [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/)
|
- [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/)
|
- [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/)
|
- [Using various modpack providers/platforms](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
|
||||||
- ...and much more
|
- ...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 \
|
tzdata \
|
||||||
rsync \
|
rsync \
|
||||||
nano \
|
nano \
|
||||||
|
ncurses \
|
||||||
sudo \
|
sudo \
|
||||||
tar \
|
tar \
|
||||||
zstd \
|
zstd \
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dnf install -y \
|
|||||||
libwebp \
|
libwebp \
|
||||||
findutils \
|
findutils \
|
||||||
which \
|
which \
|
||||||
|
glibc-langpack-en \
|
||||||
${EXTRA_DNF_PACKAGES}
|
${EXTRA_DNF_PACKAGES}
|
||||||
|
|
||||||
# Install Git LFS
|
# Install Git LFS
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.8
|
FROM python:3.9
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ The following example shows a patch-set file where various fields in the `paper.
|
|||||||
```
|
```
|
||||||
|
|
||||||
Supports the file formats:
|
Supports the file formats:
|
||||||
|
|
||||||
- JSON
|
- JSON
|
||||||
- JSON5
|
- JSON5
|
||||||
- Yaml
|
- Yaml
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ where, in this case, the standard server port 25565, will be exposed on your hos
|
|||||||
|
|
||||||
!!! note
|
!!! 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
|
!!! info
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ A file called `.paused` is created in `/data` directory when the server is pause
|
|||||||
|
|
||||||
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 `.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).
|
A starting, example compose file has been provided in [the examples](https://github.com/itzg/docker-minecraft-server/blob/master/examples/autopause/compose.yml).
|
||||||
|
|
||||||
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
|
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
|
||||||
|
|
||||||
|
|||||||
@@ -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 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 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.
|
- 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.
|
||||||
|
|
||||||
```text
|
Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it.
|
||||||
# This comment is ignored
|
|
||||||
jei:10.2.1.1005
|
|
||||||
|
|
||||||
# This and previous blank line are ignore
|
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
|
||||||
geckolib
|
|
||||||
aquaculture
|
|
||||||
naturalist
|
|
||||||
```
|
|
||||||
|
|
||||||
!!! tip "Docker Compose"
|
```text
|
||||||
|
# This comment is ignored
|
||||||
|
jei:10.2.1.1005
|
||||||
|
|
||||||
|
# This and previous blank line are ignore
|
||||||
|
geckolib
|
||||||
|
aquaculture
|
||||||
|
naturalist
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! 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
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Auto-download from Modrinth
|
# Auto-download from Modrinth
|
||||||
|
|
||||||
[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](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric, Forge, etc mods](https://modrinth.com/mods) and [Paper, etc plugins](https://modrinth.com/plugins), and [datapacks](https://modrinth.com/datapacks). 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 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/`:
|
- **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 project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
|
||||||
```
|
```
|
||||||
https://modrinth.com/mod/fabric-api
|
https://modrinth.com/mod/fabric-api
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
mkdocs-material == 9.5.47
|
mkdocs-material == 9.5.50
|
||||||
mkdocs-autorefs == 1.2.0
|
mkdocs-autorefs == 1.3.0
|
||||||
mkdocstrings == 0.27.0
|
mkdocstrings == 0.27.0
|
||||||
mkdocs-literate-nav == 0.6.1
|
mkdocs-literate-nav == 0.6.1
|
||||||
mdx-gh-links == 0.4
|
mdx-gh-links == 0.4
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# Bukkit/Spigot
|
# 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".
|
Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
|
||||||
|
|
||||||
!!! example
|
!!! example
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
|||||||
|
|
||||||
!!! example
|
!!! example
|
||||||
|
|
||||||
|
Using `docker run` command line
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run ... -e TYPE=PAPER ...
|
docker run ... -e TYPE=PAPER ...
|
||||||
|
|
||||||
@@ -16,6 +18,26 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
|||||||
docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ...
|
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
|
!!! tip
|
||||||
|
|
||||||
If you see the following error, it likely means you need to set the env var `PAPER_CHANNEL` to "experimental"
|
If you see the following error, it likely means you need to set the env var `PAPER_CHANNEL` to "experimental"
|
||||||
|
|||||||
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:
|
||||||
34
examples/craftoria/docker-compose.yml
Normal file
34
examples/craftoria/docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
ALLOW_FLIGHT: true
|
||||||
|
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||||
|
# allocate from https://console.curseforge.com/ and set in .env file
|
||||||
|
CF_API_KEY: ${CF_API_KEY}
|
||||||
|
CF_SLUG: craftoria
|
||||||
|
MEMORY: 8G
|
||||||
|
CF_EXCLUDE_MODS: |
|
||||||
|
737481
|
||||||
|
363363
|
||||||
|
394468
|
||||||
|
986380
|
||||||
|
844662
|
||||||
|
568563
|
||||||
|
915902
|
||||||
|
690971
|
||||||
|
455508
|
||||||
|
1089803
|
||||||
|
511319
|
||||||
|
volumes:
|
||||||
|
# Use managed volume by default, but can change to a relative path like
|
||||||
|
# ./data:/data
|
||||||
|
# to use a host directory
|
||||||
|
- mc-data:/data
|
||||||
|
volumes:
|
||||||
|
mc-data:
|
||||||
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:
|
||||||
@@ -4,7 +4,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MOTD: |
|
MOTD: |
|
||||||
line one
|
A §l§cMinecraft§r server
|
||||||
line two
|
line two
|
||||||
# or
|
# or
|
||||||
# MOTD: "line one\nline two"
|
# MOTD: "line one\nline two"
|
||||||
|
|||||||
@@ -14,11 +14,8 @@ services:
|
|||||||
#CF_FILENAME_MATCHER: "0.2.34"
|
#CF_FILENAME_MATCHER: "0.2.34"
|
||||||
CF_EXCLUDE_MODS: |
|
CF_EXCLUDE_MODS: |
|
||||||
controlling
|
controlling
|
||||||
craftpresence
|
|
||||||
creative-core
|
creative-core
|
||||||
default-options
|
default-options
|
||||||
equipment-compare
|
|
||||||
item-borders
|
|
||||||
itemphysic-lite
|
itemphysic-lite
|
||||||
konkrete
|
konkrete
|
||||||
oauth
|
oauth
|
||||||
|
|||||||
19
examples/skyfactory5/compose.yml
Normal file
19
examples/skyfactory5/compose.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
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
|
||||||
|
# Loads from .env file
|
||||||
|
CF_API_KEY: ${CF_API_KEY}
|
||||||
|
MEMORY: 4G
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
volumes:
|
||||||
|
- mc-data:/data
|
||||||
|
volumes:
|
||||||
|
mc-data:
|
||||||
@@ -1,17 +1,18 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server
|
image: itzg/minecraft-server:java17
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
# allocate from https://console.curseforge.com/
|
||||||
|
CF_API_KEY: ${CF_API_KEY}
|
||||||
CF_SLUG: vault-hunters-1-18-2
|
CF_SLUG: vault-hunters-1-18-2
|
||||||
CF_FILENAME_MATCHER: "Update-10.0.0"
|
MOTD: "§4----- §2 Vault Hunters: 1.18.2 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
|
||||||
MOTD: "§4----- §2 Vault Hunters: 1.18.2u10.0.0 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
|
|
||||||
MEMORY: 6G # 4G for base server + 2G per player
|
MEMORY: 6G # 4G for base server + 2G per player
|
||||||
CF_EXCLUDE_MODS: reauth
|
CF_EXCLUDE_MODS: |
|
||||||
|
reauth
|
||||||
ALLOW_FLIGHT: true
|
ALLOW_FLIGHT: true
|
||||||
ENABLE_COMMAND_BLOCK: true
|
ENABLE_COMMAND_BLOCK: true
|
||||||
DIFFICULTY: hard
|
DIFFICULTY: hard
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"clickable-advancements",
|
"clickable-advancements",
|
||||||
"configured",
|
"configured",
|
||||||
"controlling",
|
"controlling",
|
||||||
|
"craftpresence",
|
||||||
"ctm",
|
"ctm",
|
||||||
"custom-main-menu",
|
"custom-main-menu",
|
||||||
"dark-mode-everywhere",
|
"dark-mode-everywhere",
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
"entity-collision-fps-fix",
|
"entity-collision-fps-fix",
|
||||||
"entity-texture-features-fabric",
|
"entity-texture-features-fabric",
|
||||||
"entityculling",
|
"entityculling",
|
||||||
|
"equipment-compare",
|
||||||
"extreme-sound-muffler",
|
"extreme-sound-muffler",
|
||||||
"ezzoom",
|
"ezzoom",
|
||||||
"fading-night-vision",
|
"fading-night-vision",
|
||||||
@@ -61,6 +63,8 @@
|
|||||||
"inmisaddon",
|
"inmisaddon",
|
||||||
"iris-flywheel-compat",
|
"iris-flywheel-compat",
|
||||||
"irisshaders",
|
"irisshaders",
|
||||||
|
"item-borders",
|
||||||
|
"item-highlighter",
|
||||||
"item-obliterator",
|
"item-obliterator",
|
||||||
"itemphysic-lite",
|
"itemphysic-lite",
|
||||||
"itemzoom",
|
"itemzoom",
|
||||||
@@ -125,17 +129,27 @@
|
|||||||
"vanillafix",
|
"vanillafix",
|
||||||
"visuality",
|
"visuality",
|
||||||
"waila-harvestability",
|
"waila-harvestability",
|
||||||
|
"wawla",
|
||||||
|
"xaeroplus",
|
||||||
|
"yungs-menu-tweaks",
|
||||||
"zume"
|
"zume"
|
||||||
],
|
],
|
||||||
"modpacks": {
|
"modpacks": {
|
||||||
"all-of-fabric-6": {
|
"all-of-fabric-6": {
|
||||||
"forceIncludes": ["revelationary"]
|
"forceIncludes": ["revelationary"]
|
||||||
},
|
},
|
||||||
"valhelsia-5": {
|
|
||||||
"excludes": ["modernfix"]
|
|
||||||
},
|
|
||||||
"create-arcane-engineering": {
|
"create-arcane-engineering": {
|
||||||
"forceIncludes": ["just-enough-resources-jer"]
|
"forceIncludes": ["just-enough-resources-jer"]
|
||||||
|
},
|
||||||
|
"skyfactory-5": {
|
||||||
|
"forceIncludes": [
|
||||||
|
"colored-torches",
|
||||||
|
"dye-mob-dye",
|
||||||
|
"openstairs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"valhelsia-5": {
|
||||||
|
"excludes": ["modernfix"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"cherishedworlds",
|
"cherishedworlds",
|
||||||
"citresewn",
|
"citresewn",
|
||||||
"clickadv",
|
"clickadv",
|
||||||
|
"connectedness",
|
||||||
"connector",
|
"connector",
|
||||||
|
"craftpresence",
|
||||||
|
"cwb",
|
||||||
"DisableCustomWorldsAdvice",
|
"DisableCustomWorldsAdvice",
|
||||||
"drippyloadingscreen",
|
"drippyloadingscreen",
|
||||||
"eating-animation",
|
"eating-animation",
|
||||||
@@ -36,6 +39,8 @@
|
|||||||
"fancymenu",
|
"fancymenu",
|
||||||
"fast-ip-ping",
|
"fast-ip-ping",
|
||||||
"FauxCustomEntityData",
|
"FauxCustomEntityData",
|
||||||
|
"feytweaks",
|
||||||
|
"figura",
|
||||||
"GeckoLibIrisCompat",
|
"GeckoLibIrisCompat",
|
||||||
"gpumemleakfix",
|
"gpumemleakfix",
|
||||||
"Highlighter",
|
"Highlighter",
|
||||||
@@ -60,9 +65,11 @@
|
|||||||
"PickUpNotifier",
|
"PickUpNotifier",
|
||||||
"PresenceFootsteps",
|
"PresenceFootsteps",
|
||||||
"Prism",
|
"Prism",
|
||||||
|
"reforgium",
|
||||||
"reeses_sodium_options",
|
"reeses_sodium_options",
|
||||||
"ResourcePackOverrides",
|
"ResourcePackOverrides",
|
||||||
"ryoamiclights",
|
"ryoamiclights",
|
||||||
|
"screenshot_viewer",
|
||||||
"Searchables",
|
"Searchables",
|
||||||
"seasonhud",
|
"seasonhud",
|
||||||
"ShoulderSurfing",
|
"ShoulderSurfing",
|
||||||
@@ -73,7 +80,8 @@
|
|||||||
"VR-Combat",
|
"VR-Combat",
|
||||||
"YeetusExperimentus",
|
"YeetusExperimentus",
|
||||||
"yungsmenutweaks",
|
"yungsmenutweaks",
|
||||||
"Zoomify"
|
"Zoomify",
|
||||||
|
"zume"
|
||||||
],
|
],
|
||||||
"globalForceIncludes": [],
|
"globalForceIncludes": [],
|
||||||
"modpacks": {}
|
"modpacks": {}
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
|
|||||||
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
|
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
|
||||||
|
|
||||||
buildRelPath=$(
|
buildRelPath=$(
|
||||||
jq '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
|
jq -r '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
|
||||||
)
|
)
|
||||||
buildNumber=$(
|
buildNumber=$(
|
||||||
jq '.number'<<< "$canyonBuildJSON"
|
jq -r '.number'<<< "$canyonBuildJSON"
|
||||||
)
|
)
|
||||||
baseName=$(basename "${buildRelPath}")
|
baseName=$(basename "${buildRelPath}")
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
|
|||||||
fi
|
fi
|
||||||
curl -fsSL -o "$SERVER" "$downloadUrl"
|
curl -fsSL -o "$SERVER" "$downloadUrl"
|
||||||
if [ ! -f "$SERVER" ]; then
|
if [ ! -f "$SERVER" ]; then
|
||||||
logError "Failed to download from $downloadUrl (status=$?)"
|
logError "Failed to download from $downloadUrl"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -62,8 +62,11 @@ elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbManifest}" ] || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
|
if isTrue "$FTB_FORCE_REINSTALL" ||
|
||||||
ftbInstaller=/data/ftb-installer
|
! [ -f "${ftbManifest}" ] ||
|
||||||
|
! [ -f "${ftbInstallMarker}" ] ||
|
||||||
|
[ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
|
||||||
|
ftbInstaller=/data/ftb-installer-v2
|
||||||
arm=
|
arm=
|
||||||
if ! [[ -f "${ftbInstaller}" ]]; then
|
if ! [[ -f "${ftbInstaller}" ]]; then
|
||||||
if [ "$(uname -m)" == "aarch64" ]; then
|
if [ "$(uname -m)" == "aarch64" ]; then
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ export SERVER
|
|||||||
|
|
||||||
resolveVersion
|
resolveVersion
|
||||||
|
|
||||||
EXTRA_ARGS+="-minecraftVersion $VERSION"
|
EXTRA_ARGS+=" -minecraftVersion $VERSION"
|
||||||
if [[ ${KETTING_VERSION:-} ]]; then
|
if [[ ${KETTING_VERSION:-} ]]; then
|
||||||
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
|
EXTRA_ARGS+=" -kettingVersion $KETTING_VERSION"
|
||||||
fi
|
fi
|
||||||
if [[ ${FORGE_VERSION:-} ]]; then
|
if [[ ${FORGE_VERSION:-} ]]; then
|
||||||
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
|
EXTRA_ARGS+=" -forgeVersion $FORGE_VERSION"
|
||||||
fi
|
fi
|
||||||
export EXTRA_ARGS
|
export EXTRA_ARGS
|
||||||
|
|
||||||
|
|||||||
@@ -9,39 +9,46 @@ isDebugging && set -x
|
|||||||
resolveVersion
|
resolveVersion
|
||||||
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
|
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
|
||||||
|
|
||||||
mohistBaseUrl=https://ci.codemc.io/job/MohistMC/
|
mohistBaseUrl="https://mohistmc.com/api/v2/projects/mohist/"
|
||||||
mohistJobs=${mohistBaseUrl}job/
|
mohistApiUrl="${mohistBaseUrl}${VERSION}/builds/"
|
||||||
mohistJob=${mohistJobs}Mohist-${VERSION}/
|
|
||||||
|
|
||||||
function logMohistAvailableVerisons(){
|
function logMohistAvailableVerisons(){
|
||||||
logError " check ${mohistBaseUrl} for available versions"
|
logError " check ${mohistBaseUrl} for available versions"
|
||||||
logError " and set VERSION accordingly"
|
logError " and set VERSION accordingly"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! get --exists "${mohistJob}"; then
|
if ! get --exists "${mohistApiUrl}"; then
|
||||||
logError "Mohist builds do not exist for ${VERSION}"
|
logError "Mohist builds do not exist for ${VERSION}"
|
||||||
logMohistAvailableVerisons
|
logMohistAvailableVerisons
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
buildRelPath=$(
|
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
|
||||||
get --json-path '$.artifacts[0].relativePath' "${mohistJob}${MOHIST_BUILD}/api/json"
|
# 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 [[ -z "${downloadUrl}" ]]; then
|
||||||
if [[ ${baseName} != *-server.jar* ]]; then
|
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
|
||||||
logError "Mohist build for ${VERSION} is not a valid server jar, found ${baseName}"
|
|
||||||
logMohistAvailableVerisons
|
logMohistAvailableVerisons
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export SERVER="/data/${baseName}"
|
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
|
||||||
|
|
||||||
if [ ! -f "${SERVER}" ]; then
|
if [ ! -f "${SERVER}" ]; then
|
||||||
log "Downloading ${baseName}"
|
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
|
||||||
get -o "${SERVER}" "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
|
get -o "${SERVER}" "${downloadUrl}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export FAMILY=HYBRID
|
export FAMILY=HYBRID
|
||||||
|
export SERVER
|
||||||
|
|
||||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||||
|
|||||||
@@ -42,11 +42,18 @@ else
|
|||||||
applyResultsFile ${resultsFile}
|
applyResultsFile ${resultsFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download default configs to allow for consistent patching
|
defaultTopLevelConfigs="bukkit.yml spigot.yml"
|
||||||
for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
|
if versionLessThan 1.19; then
|
||||||
DOWNLOAD_DEFAULT_CONFIGS+=",${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/$c"
|
defaultTopLevelConfigs+=" paper.yml"
|
||||||
done
|
else
|
||||||
export DOWNLOAD_DEFAULT_CONFIGS
|
# 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
|
# Normalize on Spigot for downstream operations
|
||||||
export FAMILY=SPIGOT
|
export FAMILY=SPIGOT
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
|||||||
if ! mc-image-helper install-purpur \
|
if ! mc-image-helper install-purpur \
|
||||||
--output-directory=/data \
|
--output-directory=/data \
|
||||||
--results-file="$resultsFile" \
|
--results-file="$resultsFile" \
|
||||||
--url="$PURPUR_DOWNLOAD_URL}"; then
|
--url="${PURPUR_DOWNLOAD_URL}"; then
|
||||||
logError "Failed to download from custom Purpur URL"
|
logError "Failed to download from custom Purpur URL"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -41,8 +41,13 @@ if [[ "$DATAPACKS" ]]; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
elif [[ -d "$i" ]]; then
|
elif [[ -d "$i" ]]; then
|
||||||
log "Copying datapacks from $i ..."
|
if [[ -f "$i/pack.mcmeta" ]]; then
|
||||||
cp "$i"/*.zip "${out_dir}"
|
log "Copying datapack from $i"
|
||||||
|
cp -r "$i" "${out_dir}"
|
||||||
|
else
|
||||||
|
log "Copying datapacks from $i ..."
|
||||||
|
cp "$i"/*.zip "${out_dir}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
logError "Invalid URL or path given in DATAPACKS: $i"
|
logError "Invalid URL or path given in DATAPACKS: $i"
|
||||||
exit 2
|
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"
|
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
|
||||||
fi
|
fi
|
||||||
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
|
if [[ ${PATCH_DEFINITIONS} ]]; then
|
||||||
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
|
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
|
||||||
|
|||||||
@@ -513,3 +513,17 @@ function ensureRemoveAllModsOff() {
|
|||||||
REMOVE_OLD_MODS=false
|
REMOVE_OLD_MODS=false
|
||||||
fi
|
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"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user