mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-10 14:07:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1de0d20f7 | ||
|
|
a7583e0477 | ||
|
|
70b3f73ebc | ||
|
|
b3e6608470 | ||
|
|
685024a482 | ||
|
|
8541fa98c2 | ||
|
|
d85a019c57 | ||
|
|
5cb3f0a652 | ||
|
|
b94d51517d | ||
|
|
beed693663 | ||
|
|
770966bf5e | ||
|
|
67d1453ee1 | ||
|
|
7ea3f76d41 | ||
|
|
47130bb030 | ||
|
|
93f5a03995 | ||
|
|
00449564a8 | ||
|
|
b0f2be88cc | ||
|
|
685c16d6dc | ||
|
|
3a682c49f4 | ||
|
|
f3fe8284e5 | ||
|
|
79a5346182 | ||
|
|
c469eadc36 | ||
|
|
229a72cf60 | ||
|
|
d5b902899c | ||
|
|
8bf579f326 | ||
|
|
2ef336ad09 | ||
|
|
ef9a00021e | ||
|
|
94494ed744 | ||
|
|
f4b751be15 | ||
|
|
22749e08b7 | ||
|
|
efade6567b | ||
|
|
b934ff3dc6 | ||
|
|
617a626cee | ||
|
|
73fb517b5d | ||
|
|
556afff5c2 | ||
|
|
62f0e5f25e | ||
|
|
bededca888 | ||
|
|
52001b4dcb | ||
|
|
52c865361a | ||
|
|
da99021d88 |
No files matched your search
@@ -104,16 +104,14 @@ jobs:
|
|||||||
mcHelperVersion: 1.51.4-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||||
- variant: java8
|
- variant: java8
|
||||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
baseImage: eclipse-temurin:8-jre
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
mcVersion: 1.12.2
|
mcVersion: 1.12.2
|
||||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
|
||||||
mcHelperVersion: 1.51.4-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
- variant: java8-jdk
|
- variant: java8-jdk
|
||||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
baseImage: eclipse-temurin:8-jdk
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
mcVersion: 1.12.2
|
mcVersion: 1.12.2
|
||||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
|
||||||
mcHelperVersion: 1.51.4-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
env:
|
env:
|
||||||
# Assume they line up, but when forked change to your Docker Hub username
|
# Assume they line up, but when forked change to your Docker Hub username
|
||||||
@@ -166,7 +164,7 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v4.2.0
|
uses: docker/setup-qemu-action@v4.4.0
|
||||||
|
|
||||||
- name: Build for test
|
- name: Build for test
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
name: Discord notifications
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["Build and Publish"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
|
|
||||||
env:
|
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
discord:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
if: github.repository_owner == 'itzg'
|
|
||||||
steps:
|
|
||||||
- name: on-publish
|
|
||||||
if: github.event_name == 'release' && github.event.action == 'published'
|
|
||||||
uses: SethCohen/github-releases-to-discord@v1.20.0
|
|
||||||
with:
|
|
||||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
- name: on-success
|
|
||||||
if: github.event.workflow_run.conclusion == 'success'
|
|
||||||
uses: Ilshidur/action-discord@master
|
|
||||||
with:
|
|
||||||
args: |
|
|
||||||
Github repo: ${{ github.repository }}
|
|
||||||
- Branch: ${{ github.event.workflow_run.head_branch }}
|
|
||||||
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
|
||||||
- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏
|
|
||||||
- name: on-failure
|
|
||||||
if: github.event.workflow_run.conclusion == 'failure'
|
|
||||||
uses: Ilshidur/action-discord@master
|
|
||||||
with:
|
|
||||||
args: |
|
|
||||||
Github repo: ${{ github.repository }}
|
|
||||||
- Branch: ${{ github.event.workflow_run.head_branch }}
|
|
||||||
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
|
||||||
- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥
|
|
||||||
@@ -55,7 +55,8 @@ jobs:
|
|||||||
knockdRepoOrg: Metalcape/knock
|
knockdRepoOrg: Metalcape/knock
|
||||||
# JAVA 8:
|
# JAVA 8:
|
||||||
- variant: java8
|
- variant: java8
|
||||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
# make sure to track the base image version in build.yml
|
||||||
|
baseImage: eclipse-temurin:8-jre
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
mcVersion: 1.12.2
|
mcVersion: 1.12.2
|
||||||
# For GLIBC_2.34 support
|
# For GLIBC_2.34 support
|
||||||
@@ -76,7 +77,7 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v4.2.0
|
uses: docker/setup-qemu-action@v4.4.0
|
||||||
|
|
||||||
- name: Confirm multi-arch build
|
- name: Confirm multi-arch build
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
|
|||||||
+3
-3
@@ -45,19 +45,19 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--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
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
||||||
ARG MC_MONITOR_VERSION=0.17.1
|
ARG MC_MONITOR_VERSION=1.18.3
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
--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
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
||||||
ARG MC_SERVER_RUNNER_VERSION=1.15.2
|
ARG MC_SERVER_RUNNER_VERSION=1.16.0
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
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
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||||
ARG MC_HELPER_VERSION=1.67.1
|
ARG MC_HELPER_VERSION=1.71.4
|
||||||
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
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ apt-get install -y \
|
|||||||
zstd \
|
zstd \
|
||||||
lbzip2 \
|
lbzip2 \
|
||||||
nfs-common \
|
nfs-common \
|
||||||
libpcap0.8 \
|
'libpcap0.8*' \
|
||||||
libnuma1 \
|
libnuma1 \
|
||||||
libcap2-bin \
|
libcap2-bin \
|
||||||
jattach \
|
jattach \
|
||||||
|
|||||||
@@ -209,6 +209,22 @@ By default, the image finishes startup by exec'ing [mc-server-runner](https://gi
|
|||||||
> [!TIP]
|
> [!TIP]
|
||||||
> The `SERVER_RUNNER` variable is expanded when passed to `exec` so that `mc-server-runner` can be wrapped by another executable that is mounted into the container.
|
> The `SERVER_RUNNER` variable is expanded when passed to `exec` so that `mc-server-runner` can be wrapped by another executable that is mounted into the container.
|
||||||
|
|
||||||
|
## Pre-start script
|
||||||
|
|
||||||
|
To run something of your own after the image has finished setting up the server files and just before it starts the server, set `PRE_START_SCRIPT` to the path of an executable file that you have mounted into the container. The image runs it directly (not through a shell) and waits for it to finish. It runs as the user the server runs as, from the server's working directory, with the same environment the server gets. If it exits with a non-zero status, the container exits without starting the server.
|
||||||
|
|
||||||
|
For example, a script that waits for plugin jars that another process is still downloading:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
PRE_START_SCRIPT: /hooks/wait-for-plugins
|
||||||
|
volumes:
|
||||||
|
- ./hooks:/hooks:ro
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> The image does not guarantee that any particular command is available to the script, and it may change between image versions. Keeping the script working is up to you.
|
||||||
|
|
||||||
## Enable Flare Flags
|
## Enable Flare Flags
|
||||||
|
|
||||||
To enable the JVM flags required to fully support the [Flare profiling suite](https://blog.airplane.gg/flare), set the following variable:
|
To enable the JVM flags required to fully support the [Flare profiling suite](https://blog.airplane.gg/flare), set the following variable:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
### Using the MASH playbook
|
### Using the MASH playbook
|
||||||
|
|
||||||
[The MASH Playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) is a premade playbook with the option to deploy a [wide variety of open-source services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md) to your server(s), including [docker-minecraft-server](https://github.com/XHawk87/ansible-role-minecraft), making it a good option if you want all the bells and whistles alongside your Minecraft server.
|
[The MASH Playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) is a premade playbook with the option to deploy a [wide variety of open-source services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md) to your server(s), including [docker-minecraft-server](https://github.com/mother-of-all-self-hosting/ansible-role-minecraft), making it a good option if you want all the bells and whistles alongside your Minecraft server.
|
||||||
- Check out the [Installation Guide](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/README.md) for the MASH playbook to get started.
|
- Check out the [Installation Guide](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/README.md) for the MASH playbook to get started.
|
||||||
- You can then enable [Minecraft](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/minecraft.md) in your vars.yml.
|
- You can then enable [Minecraft](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/minecraft.md) in your vars.yml.
|
||||||
- Enable any supporting services that you might find useful, such as [user authentication](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/authelia.md), [remote backups](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/backup-borg.md), [email relay](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/exim-relay.md), [cron monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/healthchecks.md), [audio and video conferencing](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/jitsi.md), databases ([MariaDB](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/mariadb.md), [PostgresSQL](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/postgres.md)), [push notifications](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/ntfy.md), [uptime monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/uptime-kuma.md), [a website](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/wordpress.md), as well as installing any [extra files, folders, applications, services and running commands](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/auxiliary.md) automatically on deployment.
|
- Enable any supporting services that you might find useful, such as [user authentication](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/authelia.md), [remote backups](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/backup-borg.md), [email relay](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/exim-relay.md), [cron monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/healthchecks.md), [audio and video conferencing](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/jitsi.md), databases ([MariaDB](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/mariadb.md), [PostgresSQL](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/postgres.md)), [push notifications](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/ntfy.md), [uptime monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/uptime-kuma.md), [a website](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/wordpress.md), as well as installing any [extra files, folders, applications, services and running commands](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/auxiliary.md) automatically on deployment.
|
||||||
|
|||||||
@@ -33,3 +33,7 @@ An image that dockerizes [rcon-web-admin](https://github.com/rcon-web-admin/rcon
|
|||||||
### [AutoStopper](https://github.com/Criseda/AutoStopper)
|
### [AutoStopper](https://github.com/Criseda/AutoStopper)
|
||||||
|
|
||||||
A Velocity plugin that stops idle backend servers and wakes them when players connect, with readiness-aware Docker lifecycle management.
|
A Velocity plugin that stops idle backend servers and wakes them when players connect, with readiness-aware Docker lifecycle management.
|
||||||
|
|
||||||
|
### [Kobblestone](https://github.com/kobblestoneio/kobblestone)
|
||||||
|
|
||||||
|
A Kubernetes operator for Minecraft that supports custom resource types to manage servers, routers, backups and more.
|
||||||
@@ -66,6 +66,8 @@ You can also specify the `REMOVE_OLD_MODS_DEPTH` (default is 16) variable to onl
|
|||||||
|
|
||||||
For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory.
|
For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory.
|
||||||
|
|
||||||
|
To remove all files in the `/data/config` directory before a modpack is downloaded and unpacked, set `REMOVE_OLD_CONFIGS=TRUE`. This is useful when a modpack update would otherwise override locally customized configuration files. The removal process can be fine tuned with `REMOVE_OLD_CONFIGS_INCLUDE` and `REMOVE_OLD_CONFIGS_EXCLUDE` (comma separated lists of file glob patterns, defaults to `*` so everything is removed) and `REMOVE_OLD_CONFIGS_DEPTH` (default 16). The target directory can be changed with `CONFIG_OUT_DIR` (default `/data/config`).
|
||||||
|
|
||||||
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.
|
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 "Multiple source directories"
|
!!! information "Multiple source directories"
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ Where:
|
|||||||
|
|
||||||
- **Project** is the project slug or ID, see below
|
- **Project** is the project slug or ID, see below
|
||||||
- **Version** is the version ID (such as "Oa9ZDzZq") or number (such as "2.21.2"). When omitted, the latest release version will be selected. Using version ID will override Minecraft and loader compatibility checks.
|
- **Version** is the version ID (such as "Oa9ZDzZq") or number (such as "2.21.2"). When omitted, the latest release version will be selected. Using version ID will override Minecraft and loader compatibility checks.
|
||||||
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select.
|
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select. By default, the newest version that is the same or better release type is selected.
|
||||||
|
A `+` suffix can be used to indicate instead that the most "stable" version is selected.
|
||||||
- **Prefix** is `datapack`, `fabric`, `forge`, or `paper`
|
- **Prefix** is `datapack`, `fabric`, `forge`, or `paper`
|
||||||
- The `datapack` prefix is optional when running a vanilla server
|
- The `datapack` prefix is optional when running a vanilla server
|
||||||
- The `fabric`, `forge`, and `paper` prefixes allow for installing mods/plugins that differ from server's `TYPE`. Using [Sinytra Connector](https://modrinth.com/mod/connector) is an example of this, where Fabric mods can be loaded into a NeoForge server.
|
- The `fabric`, `forge`, and `paper` prefixes allow for installing mods/plugins that differ from server's `TYPE`. Using [Sinytra Connector](https://modrinth.com/mod/connector) is an example of this, where Fabric mods can be loaded into a NeoForge server.
|
||||||
@@ -46,18 +47,22 @@ Where:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Examples
|
!!! tip "Most stable release type"
|
||||||
|
|
||||||
| Description | Example projects entry |
|
As an example of using the `{release type}+` feature, [Concurrent Chunk Management for 1.12.11](https://modrinth.com/mod/c2me-fabric/versions?g=1.21.11) had a "release" version at "0.3.6.0.0" and then started publishing "alpha"s with "0.3.7+alpha.0.6+1.21.11". Using `c2me-fabric:alpha+` indicates that the newest "stable" is actually preferred, which is "0.3.6.0.0".
|
||||||
|---------------------------------|-------------------------------------------------------|
|
|
||||||
| Select latest version | `fabric-api` |
|
### Examples
|
||||||
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
|
||||||
| Select latest beta version | `fabric-api:beta` |
|
| Description | Example projects entry |
|
||||||
| Latest version using project ID | `P7dR8mSH` |
|
|---------------------------------|-------------------------------------------------------|
|
||||||
| Latest version of datapack | `datapack:terralith` |
|
| Select latest version | `fabric-api` |
|
||||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
||||||
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
| Select latest beta version | `fabric-api:beta` |
|
||||||
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
| Latest version using project ID | `P7dR8mSH` |
|
||||||
|
| Latest version of datapack | `datapack:terralith` |
|
||||||
|
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||||
|
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
||||||
|
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
click==8.5.0
|
click==8.5.0
|
||||||
colorama==0.4.6
|
colorama==0.4.6
|
||||||
deepmerge==3.0
|
deepmerge==3.0.1
|
||||||
ghp-import==2.1.0
|
ghp-import==2.1.0
|
||||||
griffe==2.2.0
|
griffe==2.3.0
|
||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
Markdown==3.10.3
|
Markdown==3.11
|
||||||
MarkupSafe==3.0.3
|
MarkupSafe==3.0.4
|
||||||
mergedeep==1.3.4
|
mergedeep==1.3.4
|
||||||
mkdocs==1.6.1
|
mkdocs==1.6.1
|
||||||
mkdocs-autorefs==1.4.4
|
mkdocs-autorefs==1.4.4
|
||||||
mkdocs-get-deps==0.2.2
|
mkdocs-get-deps==0.2.2
|
||||||
mkdocstrings==1.0.6
|
mkdocstrings==1.0.6
|
||||||
mkdocstrings-python==2.0.7
|
mkdocstrings-python==2.0.9
|
||||||
packaging==26.3
|
packaging==26.3
|
||||||
pathspec==1.1.1
|
pathspec==1.1.1
|
||||||
platformdirs==4.11.5
|
platformdirs==4.12.3
|
||||||
Pygments==2.21.0
|
Pygments==2.21.0
|
||||||
pymdown-extensions==11.0.2
|
pymdown-extensions==12.1
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
PyYAML==6.0.3
|
PyYAML==6.0.3
|
||||||
pyyaml_env_tag==1.1
|
pyyaml_env_tag==1.1
|
||||||
six==1.17.0
|
six==1.17.0
|
||||||
watchdog==6.0.0
|
watchdog==6.0.0
|
||||||
zensical==0.0.57
|
zensical==0.0.67
|
||||||
@@ -288,6 +288,12 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
|||||||
<td><code>false</code></td>
|
<td><code>false</code></td>
|
||||||
<td>⬜️</td>
|
<td>⬜️</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>PRE_START_SCRIPT</code></td>
|
||||||
|
<td>Path to an executable run after setup and just before the server starts. The server is not started if it exits non-zero. See <a href="../configuration/misc-options/#pre-start-script">Pre-start script</a></td>
|
||||||
|
<td><code></code></td>
|
||||||
|
<td>⬜️</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>USE_FLARE_FLAGS</code></td>
|
<td><code>USE_FLARE_FLAGS</code></td>
|
||||||
<td>To enable the JVM flags required to fully support the <a href="https://blog.airplane.gg/flare">Flare profiling suite</a>.</td>
|
<td>To enable the JVM flags required to fully support the <a href="https://blog.airplane.gg/flare">Flare profiling suite</a>.</td>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
cf-api-key*
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
name: atm10-with-secret-file
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
cf-api-key:
|
||||||
|
file: ./cf-api-key.txt
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||||
|
CF_SLUG: all-the-mods-10
|
||||||
|
# Optional: select a specific version/file
|
||||||
|
# CF_FILENAME_MATCHER: "1.17"
|
||||||
|
CF_API_KEY_FILE: /run/secrets/cf-api-key
|
||||||
|
DEBUG: true
|
||||||
|
MEMORY: 4G
|
||||||
|
CF_OVERRIDES_EXCLUSIONS: |
|
||||||
|
# Not applicable for server side
|
||||||
|
shaderpacks/**
|
||||||
|
secrets:
|
||||||
|
- cf-api-key
|
||||||
|
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:
|
||||||
@@ -8,10 +8,13 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||||
|
# Verified up to ATM10 8.1
|
||||||
CF_SLUG: all-the-mods-10
|
CF_SLUG: all-the-mods-10
|
||||||
# Optional: select a specific version/file
|
# Optional: select a specific version/file
|
||||||
# CF_FILENAME_MATCHER: "1.17"
|
# CF_FILENAME_MATCHER: "1.17"
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
|
CF_IGNORE_MISSING_FILES: |
|
||||||
|
config/ftbquests/quests/reward_tables/*.snbt
|
||||||
CF_OVERRIDES_EXCLUSIONS: |
|
CF_OVERRIDES_EXCLUSIONS: |
|
||||||
# Not applicable for server side
|
# Not applicable for server side
|
||||||
shaderpacks/**
|
shaderpacks/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java8-multiarch
|
image: itzg/minecraft-server:java8
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java8-multiarch
|
image: itzg/minecraft-server:java8
|
||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java8-multiarch
|
image: itzg/minecraft-server:java8
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- data:/data
|
||||||
- ./modpacks:/modpacks:ro
|
- ./modpacks:/modpacks:ro
|
||||||
|
|||||||
@@ -177,6 +177,7 @@
|
|||||||
"yungs-menu-tweaks",
|
"yungs-menu-tweaks",
|
||||||
"zume"
|
"zume"
|
||||||
],
|
],
|
||||||
|
"globalForceIncludes": ["simply-tooltips"],
|
||||||
"modpacks": {
|
"modpacks": {
|
||||||
"all-of-fabric-6": {
|
"all-of-fabric-6": {
|
||||||
"forceIncludes": ["revelationary"]
|
"forceIncludes": ["revelationary"]
|
||||||
@@ -184,11 +185,14 @@
|
|||||||
"beyond-depth": {
|
"beyond-depth": {
|
||||||
"forceIncludes": ["particular-reforged"]
|
"forceIncludes": ["particular-reforged"]
|
||||||
},
|
},
|
||||||
|
"craftoria": {
|
||||||
|
"forceIncludes": ["tmrv"]
|
||||||
|
},
|
||||||
"create-arcane-engineering": {
|
"create-arcane-engineering": {
|
||||||
"forceIncludes": ["just-enough-resources-jer"]
|
"forceIncludes": ["just-enough-resources-jer"]
|
||||||
},
|
},
|
||||||
"fantasy-minecraft-fabric": {
|
"fantasy-minecraft-fabric": {
|
||||||
"forceIncludes": ["simply-tooltips", "icon-leading-tooltip"]
|
"forceIncludes": ["icon-leading-tooltip"]
|
||||||
},
|
},
|
||||||
"ftb-stoneblock-4": {
|
"ftb-stoneblock-4": {
|
||||||
"forceIncludes": [
|
"forceIncludes": [
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
"Zoomify",
|
"Zoomify",
|
||||||
"zume"
|
"zume"
|
||||||
],
|
],
|
||||||
"globalForceIncludes": [],
|
"globalForceIncludes": ["/(^|/)simplytooltips-/", "/(^|/)s-lib-/"],
|
||||||
"modpacks": {
|
"modpacks": {
|
||||||
"cobbleverse": {
|
"cobbleverse": {
|
||||||
"excludes": [
|
"excludes": [
|
||||||
|
|||||||
@@ -10,6 +10,16 @@
|
|||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
|
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"description": "Update versioned images used by Dockerfile COPY --from instructions",
|
||||||
|
"managerFilePatterns": ["/^Dockerfile$/"],
|
||||||
|
"matchStrings": [
|
||||||
|
"COPY --from=(?<depName>[^:\\s]+):(?<currentValue>[^\\s]+)\\s"
|
||||||
|
],
|
||||||
|
"datasourceTemplate": "docker",
|
||||||
|
"versioningTemplate": "docker"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"labels": ["dependencies"]
|
"labels": ["dependencies"]
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ if isTrue "$PREFER_IPV6"; then
|
|||||||
export JVM_DD_OPTS
|
export JVM_DD_OPTS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( $(mc-image-helper java-release) >= 17 )); then
|
if (( $(getJavaRelease) >= 17 )); then
|
||||||
MC_IMAGE_HELPER_OPTS+=" --enable-native-access=ALL-UNNAMED"
|
MC_IMAGE_HELPER_OPTS+=" --enable-native-access=ALL-UNNAMED"
|
||||||
export MC_IMAGE_HELPER_OPTS
|
export MC_IMAGE_HELPER_OPTS
|
||||||
fi
|
fi
|
||||||
|
|||||||
+32
-21
@@ -4,9 +4,33 @@
|
|||||||
. "$(dirname "$0")/start-utils"
|
. "$(dirname "$0")/start-utils"
|
||||||
|
|
||||||
# Define setup functions
|
# Define setup functions
|
||||||
|
function getGTNHversion(){
|
||||||
|
local gtnh_versions_json_url="https://downloads.gtnewhorizons.com/versions.json"
|
||||||
|
local json
|
||||||
|
local result
|
||||||
|
|
||||||
|
if ! json="$(curl -fsSL "$gtnh_versions_json_url")"; then
|
||||||
|
logError "Failed to download from \"$gtnh_versions_json_url\"" >&2
|
||||||
|
return 1
|
||||||
|
elif [[ -z $json ]]; then
|
||||||
|
logError "Empty response from \"$gtnh_versions_json_url\"" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! result="$(jq "$@" <<< "$json")"; then
|
||||||
|
logError "Failed to parse the versions file from \"$gtnh_versions_json_url\"" >&2
|
||||||
|
return 1
|
||||||
|
elif [[ $result == "null" ]] || [[ -z $result ]]; then
|
||||||
|
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
printf '%s\n' "$result"
|
||||||
|
}
|
||||||
|
|
||||||
function getGTNHdownloadPath(){
|
function getGTNHdownloadPath(){
|
||||||
gtnh_download_path=""
|
gtnh_download_path=""
|
||||||
local release_object=""
|
local release_object=""
|
||||||
|
local log_version_from=""
|
||||||
|
|
||||||
# Select release JSON object
|
# Select release JSON object
|
||||||
# latest-dev will be removed in the future, but is still supported for now.
|
# latest-dev will be removed in the future, but is still supported for now.
|
||||||
@@ -14,37 +38,24 @@ function getGTNHdownloadPath(){
|
|||||||
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
||||||
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
||||||
fi
|
fi
|
||||||
if ! release_object="$(
|
release_object=$(getGTNHversion '(.versions // .)|to_entries|map(select(.value.title == "Beta release"))|sort_by(.value.releaseDate,(.key | ascii_downcase | if test("rc") then 2 elif test("beta") then 1 else 0 end))|.[-1]') || exit 1
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
log_version_from="latest beta";
|
||||||
| jq -r '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Beta release"))|.[-1]'
|
|
||||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
log "Selected $(jq '.key' <<< "$release_object") as latest dev version for download."
|
|
||||||
|
|
||||||
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
||||||
if ! release_object="$(
|
release_object=$(getGTNHversion '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]') || exit 1
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
log_version_from="latest";
|
||||||
| jq -r '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]'
|
|
||||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
log "Selected $(jq '.key' <<< "$release_object") as latest version for download."
|
|
||||||
|
|
||||||
else
|
else
|
||||||
if ! release_object="$(
|
release_object=$(getGTNHversion --arg USRIN "$GTNH_PACK_VERSION" '($USRIN | ascii_downcase) as $in|(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select((.key | ascii_downcase)==$in))|.[]') || exit 1
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
log_version_from="matching";
|
||||||
| jq -r --arg USRIN "$GTNH_PACK_VERSION" '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
|
||||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
log "Selected $(jq -r '.key' <<< "$release_object") as matching version for download."
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $release_object ]]; then
|
if [[ -z $release_object ]]; then
|
||||||
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
||||||
exit 1
|
exit 1
|
||||||
|
else
|
||||||
|
log "Selected \"$(jq -r '.key' <<< "$release_object")\" as ${log_version_from} version for download."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Select compatible server files for java version
|
# Select compatible server files for java version
|
||||||
|
|||||||
@@ -4,10 +4,27 @@
|
|||||||
: "${SETUP_ONLY:=false}"
|
: "${SETUP_ONLY:=false}"
|
||||||
: "${CUSTOM_JAR_EXEC:=}"
|
: "${CUSTOM_JAR_EXEC:=}"
|
||||||
: "${SERVER_RUNNER:=mc-server-runner}"
|
: "${SERVER_RUNNER:=mc-server-runner}"
|
||||||
|
: "${PRE_START_SCRIPT:=}"
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
# shellcheck source=start-utils
|
||||||
. "$(dirname "$0")/start-utils"
|
. "$(dirname "$0")/start-utils"
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
|
function runPreStartScript() {
|
||||||
|
if [[ ! $PRE_START_SCRIPT ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [[ ! -x $PRE_START_SCRIPT ]]; then
|
||||||
|
logError "PRE_START_SCRIPT $PRE_START_SCRIPT is not an executable file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
log "Running pre-start script $PRE_START_SCRIPT..."
|
||||||
|
if ! "$PRE_START_SCRIPT"; then
|
||||||
|
logError "Pre-start script $PRE_START_SCRIPT failed, so the server will not be started"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
baseDataDir=/data
|
baseDataDir=/data
|
||||||
tmpServerIconPath=/tmp/icon.img
|
tmpServerIconPath=/tmp/icon.img
|
||||||
serverIconPath=${baseDataDir}/server-icon.png
|
serverIconPath=${baseDataDir}/server-icon.png
|
||||||
@@ -505,6 +522,7 @@ if [[ ${TYPE} == "CURSEFORGE" && "${SERVER}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
log "Starting CurseForge server in ${FTB_DIR}..."
|
log "Starting CurseForge server in ${FTB_DIR}..."
|
||||||
|
runPreStartScript
|
||||||
if isTrue "${DEBUG_EXEC}"; then
|
if isTrue "${DEBUG_EXEC}"; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
@@ -569,6 +587,7 @@ fi
|
|||||||
JVM_ARGS=${JVM_ARGS//$'\n'/}
|
JVM_ARGS=${JVM_ARGS//$'\n'/}
|
||||||
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
|
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
|
||||||
fi
|
fi
|
||||||
|
runPreStartScript
|
||||||
exec ${SERVER_RUNNER} "${mcServerRunnerArgs[@]}" -- "${finalArgs[@]}"
|
exec ${SERVER_RUNNER} "${mcServerRunnerArgs[@]}" -- "${finalArgs[@]}"
|
||||||
elif [[ $SERVER =~ run.sh ]]; then
|
elif [[ $SERVER =~ run.sh ]]; then
|
||||||
log "Using Forge supplied run.sh script..."
|
log "Using Forge supplied run.sh script..."
|
||||||
@@ -577,6 +596,7 @@ elif [[ $SERVER =~ run.sh ]]; then
|
|||||||
echo "SETUP_ONLY: bash ${SERVER}"
|
echo "SETUP_ONLY: bash ${SERVER}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
runPreStartScript
|
||||||
if isTrue "${DEBUG_EXEC}"; then
|
if isTrue "${DEBUG_EXEC}"; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
@@ -614,6 +634,7 @@ else
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
runPreStartScript
|
||||||
if isTrue "${DEBUG_EXEC}"; then
|
if isTrue "${DEBUG_EXEC}"; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ set -e -o pipefail
|
|||||||
: "${PLUGINS_FILE:=}"
|
: "${PLUGINS_FILE:=}"
|
||||||
: "${REMOVE_OLD_MODS_DEPTH:=1} "
|
: "${REMOVE_OLD_MODS_DEPTH:=1} "
|
||||||
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
|
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
|
||||||
|
: "${REMOVE_OLD_CONFIGS:=false}"
|
||||||
|
: "${CONFIG_OUT_DIR:=/data/config}"
|
||||||
|
: "${REMOVE_OLD_CONFIGS_DEPTH:=16}"
|
||||||
|
: "${REMOVE_OLD_CONFIGS_INCLUDE:=*}"
|
||||||
|
: "${REMOVE_OLD_CONFIGS_EXCLUDE:=}"
|
||||||
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
|
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
|
||||||
: "${MODRINTH_LOADER:=}"
|
: "${MODRINTH_LOADER:=}"
|
||||||
|
|
||||||
@@ -25,6 +30,10 @@ if isTrue "${REMOVE_OLD_MODS}" && [ -z "${MODS_FILE}" ]; then
|
|||||||
rm -f "$sum_file"
|
rm -f "$sum_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if isTrue "${REMOVE_OLD_CONFIGS}"; then
|
||||||
|
removeOldConfigs "$CONFIG_OUT_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
function handlePackwiz() {
|
function handlePackwiz() {
|
||||||
# If packwiz url passed, bootstrap packwiz and update mods before other modpack processing
|
# If packwiz url passed, bootstrap packwiz and update mods before other modpack processing
|
||||||
if [[ "${PACKWIZ_URL:-}" ]]; then
|
if [[ "${PACKWIZ_URL:-}" ]]; then
|
||||||
|
|||||||
+47
-3
@@ -547,6 +547,23 @@ function removeOldMods {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeOldConfigs {
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
log "Removing old configs including='${REMOVE_OLD_CONFIGS_INCLUDE}' excluding='${REMOVE_OLD_CONFIGS_EXCLUDE}' up to depth=${REMOVE_OLD_CONFIGS_DEPTH}"
|
||||||
|
args=(
|
||||||
|
--delete
|
||||||
|
--type file
|
||||||
|
--min-depth=1 --max-depth "${REMOVE_OLD_CONFIGS_DEPTH}"
|
||||||
|
--name "${REMOVE_OLD_CONFIGS_INCLUDE}"
|
||||||
|
--exclude-name "${REMOVE_OLD_CONFIGS_EXCLUDE}"
|
||||||
|
)
|
||||||
|
if ! isDebugging; then
|
||||||
|
args+=(--quiet)
|
||||||
|
fi
|
||||||
|
mc-image-helper find "${args[@]}" "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function get() {
|
function get() {
|
||||||
mc-image-helper get "$@"
|
mc-image-helper get "$@"
|
||||||
}
|
}
|
||||||
@@ -579,11 +596,21 @@ function isType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extract() {
|
function extract() {
|
||||||
src=${1?}
|
local src=${1?}
|
||||||
destDir=${2?}
|
local destDir=${2?}
|
||||||
shift 2
|
shift 2
|
||||||
# remaining args are paths within the archive to extract; if none, extract everything
|
# Remaining args are paths within the archive; if none, extract everything.
|
||||||
|
|
||||||
|
# Use modern `mc-image-helper extract archive` if it exists. Standardises extraction logic
|
||||||
|
# and checks if ZipSlips / Path Traversals exist before extraction
|
||||||
|
# Supports ZIP, TAR, TAR.GZ, TAR.BZ2, TAR.ZSTD
|
||||||
|
if mc-image-helper has-feature archive; then
|
||||||
|
mc-image-helper archive extract --overwrite -- "${src}" "${destDir}" "$@"
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Older helper builds, including Java 8, use the shell extraction fallback.
|
||||||
|
local type
|
||||||
type=$(file -b --mime-type "${src}")
|
type=$(file -b --mime-type "${src}")
|
||||||
if [[ "$type" == application/octet-stream ]]; then
|
if [[ "$type" == application/octet-stream ]]; then
|
||||||
logWarning "Detected non-specific file type $type for $src"
|
logWarning "Detected non-specific file type $type for $src"
|
||||||
@@ -629,6 +656,23 @@ function getDistro() {
|
|||||||
grep -E "^ID=" /etc/os-release | cut -d= -f2 | sed -e 's/"//g'
|
grep -E "^ID=" /etc/os-release | cut -d= -f2 | sed -e 's/"//g'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getJavaRelease() {
|
||||||
|
# Read the major version from the JDK's release file so no JVM has to start;
|
||||||
|
# the helper is the fallback when the file is missing.
|
||||||
|
local version
|
||||||
|
if [[ ${JAVA_HOME:-} && -f "$JAVA_HOME/release" ]]; then
|
||||||
|
version=$(sed -n -e 's/^JAVA_VERSION="\(.*\)"$/\1/p' "$JAVA_HOME/release")
|
||||||
|
# Java 8 and earlier report 1.8.0_312 and so on
|
||||||
|
version=${version#1.}
|
||||||
|
version=${version%%[._-]*}
|
||||||
|
fi
|
||||||
|
if isNumeric "${version:-}"; then
|
||||||
|
echo "$version"
|
||||||
|
else
|
||||||
|
mc-image-helper java-release
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function checkSum() {
|
function checkSum() {
|
||||||
local sum_file=${1?}
|
local sum_file=${1?}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,43 @@
|
|||||||
|
services:
|
||||||
|
# copies an existing config into /data before mc starts, so REMOVE_OLD_CONFIGS
|
||||||
|
# has an old config to remove once the modpack config is installed
|
||||||
|
seed:
|
||||||
|
restart: "no"
|
||||||
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
|
entrypoint: ["bash", "-c", "mkdir -p /data/config && cp /seed/config/stale.txt /data/config/ && chown -R 1000:1000 /data"]
|
||||||
|
volumes:
|
||||||
|
- ./seed:/seed
|
||||||
|
- ./data:/data
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: nginx
|
||||||
|
volumes:
|
||||||
|
- ./configs.zip:/usr/share/nginx/html/configs.zip:ro
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "--fail", "http://localhost/configs.zip"]
|
||||||
|
interval: 3s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
mc:
|
||||||
|
restart: "no"
|
||||||
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
|
depends_on:
|
||||||
|
seed:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
web:
|
||||||
|
condition: service_healthy
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
SETUP_ONLY: "true"
|
||||||
|
GENERIC_PACKS: http://web/configs.zip
|
||||||
|
REMOVE_OLD_CONFIGS: "true"
|
||||||
|
LOG_TIMESTAMP: "true"
|
||||||
|
# the following are only used to speed up test execution
|
||||||
|
TYPE: CUSTOM
|
||||||
|
CUSTOM_SERVER: /servers/fake.jar
|
||||||
|
VERSION: 1.18.1
|
||||||
|
DEBUG: "true"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
- ./fake.jar:/servers/fake.jar
|
||||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
|||||||
|
old
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# verify that the old config was removed and the new one from the pack was installed
|
||||||
|
mc-image-helper assert fileNotExists config/stale.txt
|
||||||
|
mc-image-helper assert fileExists config/opt.yml
|
||||||
Reference in new issue
Block a user