mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-29 11:54:54 +00:00
Compare commits
53
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fce69c90ae | ||
|
|
9a2348cadd | ||
|
|
33159ddd83 | ||
|
|
7e1c26a18f | ||
|
|
0459532398 | ||
|
|
99d4481c01 | ||
|
|
194accb407 | ||
|
|
7f1affbcd8 | ||
|
|
4cbdf520c8 | ||
|
|
a3bb7bff34 | ||
|
|
1e77b81b32 | ||
|
|
479973c950 | ||
|
|
2a246ee805 | ||
|
|
3c4c94e1ad | ||
|
|
cd2c5628f2 | ||
|
|
0a445cd8db | ||
|
|
537a3e43fe | ||
|
|
17d7f01267 | ||
|
|
591f37bfa5 | ||
|
|
3302bdb3cb | ||
|
|
fe9f471da7 | ||
|
|
159d8f6939 | ||
|
|
8f9e8db492 | ||
|
|
e85630b3af | ||
|
|
d18a464a77 | ||
|
|
719166908a | ||
|
|
66785d6ce8 | ||
|
|
9cff43e8dc | ||
|
|
c17ea4cf7b | ||
|
|
641f19879a | ||
|
|
de75f2e671 | ||
|
|
175004e656 | ||
|
|
81293634de | ||
|
|
3c3e49e385 | ||
|
|
fd55a0cc08 | ||
|
|
b0de461d1e | ||
|
|
ebb80ea264 | ||
|
|
702d05e60c | ||
|
|
32b026d0df | ||
|
|
d9ee3ee68c | ||
|
|
ab505fa43c | ||
|
|
78ecbb5749 | ||
|
|
e992e71988 | ||
|
|
3cc2e64163 | ||
|
|
f1dd0f3d71 | ||
|
|
292b2f757e | ||
|
|
82043d556e | ||
|
|
d9bf26cc17 | ||
|
|
8b076e4868 | ||
|
|
4c534490f2 | ||
|
|
314beec407 | ||
|
|
2ecf6776e2 | ||
|
|
dadecdac28 |
@@ -0,0 +1,2 @@
|
|||||||
|
*.sh text eol=lf
|
||||||
|
scripts/** text eol=lf
|
||||||
@@ -6,10 +6,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
auto-release:
|
auto-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# If forked, changed to your username to enable auto-releases
|
||||||
|
if: github.repository_owner == 'itzg'
|
||||||
steps:
|
steps:
|
||||||
- uses: zenengeo/github-auto-release-action@main
|
- uses: zenengeo/github-auto-release-action@main
|
||||||
with:
|
with:
|
||||||
stable-duration: 3d
|
stable-duration: 3d
|
||||||
force-duration: 14d
|
force-duration: 14d
|
||||||
|
# It is important to use a token other than the workflow allocated GITHUB_TOKEN,
|
||||||
|
# since actions prevent loops by disallowing recursive workflow triggers with that token.
|
||||||
|
# In this case, the created tag needs to trigger the "Build and Publish" workflow.
|
||||||
token: '${{ secrets.GH_TOKEN }}'
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
|
|
||||||
|
|||||||
+36
-25
@@ -18,6 +18,7 @@ on:
|
|||||||
- "zensical.toml"
|
- "zensical.toml"
|
||||||
- ".readthedocs.yaml"
|
- ".readthedocs.yaml"
|
||||||
- "renovate.json5"
|
- "renovate.json5"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -40,8 +41,10 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
# JAVA 25
|
# JAVA 25
|
||||||
- variant: java25
|
- variant: java25
|
||||||
baseImage: eclipse-temurin:25-jre
|
# NOTE: 25-jre is also Noble (currently), but this variant needs to be 25-jre-noble specifically to include riscv64
|
||||||
platforms: linux/amd64,linux/arm64
|
# Keep this aligned in verify-pr.yml also
|
||||||
|
baseImage: eclipse-temurin:25-jre-noble
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
||||||
mcVersion: latest
|
mcVersion: latest
|
||||||
- variant: java25-alpine
|
- variant: java25-alpine
|
||||||
baseImage: eclipse-temurin:25-jre-alpine
|
baseImage: eclipse-temurin:25-jre-alpine
|
||||||
@@ -76,47 +79,49 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
mcVersion: 1.16.5
|
mcVersion: 1.16.5
|
||||||
# Pin version for pre-Java 17
|
# Pin version for pre-Java 17
|
||||||
mcHelperVersion: 1.51.3-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
# JAVA 11
|
# JAVA 11
|
||||||
- variant: java11
|
- variant: java11
|
||||||
baseImage: adoptopenjdk:11-jre-hotspot
|
baseImage: adoptopenjdk:11-jre-hotspot
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
mcVersion: 1.16.4
|
mcVersion: 1.16.4
|
||||||
# Pin version for pre-Java 17
|
# Pin version for pre-Java 17
|
||||||
mcHelperVersion: 1.51.3-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:8u312-b07-jre-focal
|
||||||
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
|
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
||||||
mcHelperVersion: 1.51.3-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
- variant: java8-jdk
|
- variant: java8-jdk
|
||||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||||
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
|
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
||||||
mcHelperVersion: 1.51.3-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
env:
|
env:
|
||||||
|
# Assume they line up, but when forked change to your Docker Hub username
|
||||||
|
DOCKER_HUB_ORG: ${{ github.repository_owner }}
|
||||||
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
|
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
|
||||||
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
||||||
MAIN_VARIANT: java25
|
MAIN_VARIANT: java25
|
||||||
|
PUSH: ${{ github.repository_owner == 'itzg' }}
|
||||||
|
IMAGE_AUTHOR: "Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6.0.3
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
# for build-files step
|
# for build-files step
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v6.1.0
|
uses: docker/metadata-action@v6.2.0
|
||||||
with:
|
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.
|
|
||||||
images: |
|
images: |
|
||||||
${{ github.repository_owner }}/minecraft-server
|
${{ env.DOCKER_HUB_ORG }}/minecraft-server
|
||||||
ghcr.io/${{ github.repository_owner }}/minecraft-server
|
ghcr.io/${{ github.repository_owner }}/minecraft-server
|
||||||
tags: |
|
tags: |
|
||||||
# Apply the variant as a moving tag for most recent commit per variant
|
# Apply the variant as a moving tag for most recent commit per variant
|
||||||
@@ -138,16 +143,16 @@ jobs:
|
|||||||
flavor: |
|
flavor: |
|
||||||
latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == github.event.repository.default_branch }}
|
latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == github.event.repository.default_branch }}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
org.opencontainers.image.authors=${{ env.IMAGE_AUTHOR }}
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v4.1.0
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v4.1.0
|
uses: docker/setup-qemu-action@v4.2.0
|
||||||
|
|
||||||
- name: Build for test
|
- name: Build for test
|
||||||
uses: docker/build-push-action@v7.2.0
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: ${{ env.IMAGE_TO_TEST }}
|
tags: ${{ env.IMAGE_TO_TEST }}
|
||||||
@@ -159,6 +164,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BASE_IMAGE=${{ matrix.baseImage }}
|
BASE_IMAGE=${{ matrix.baseImage }}
|
||||||
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
||||||
|
${{ matrix.knockdRepoOrg && format('KNOCKD_REPO_ORG={0}', matrix.knockdRepoOrg) }}
|
||||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||||
# no cache-to to avoid cross-cache update from next build step
|
# no cache-to to avoid cross-cache update from next build step
|
||||||
|
|
||||||
@@ -172,14 +178,14 @@ jobs:
|
|||||||
tests/test.sh
|
tests/test.sh
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v4.2.0
|
uses: docker/login-action@v4.4.0
|
||||||
if: env.HAS_IMAGE_REPO_ACCESS
|
if: env.HAS_IMAGE_REPO_ACCESS
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
uses: docker/login-action@v4.2.0
|
uses: docker/login-action@v4.4.0
|
||||||
if: env.HAS_IMAGE_REPO_ACCESS
|
if: env.HAS_IMAGE_REPO_ACCESS
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
@@ -187,19 +193,22 @@ jobs:
|
|||||||
password: ${{ github.token }}
|
password: ${{ github.token }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v7.2.0
|
uses: docker/build-push-action@v7
|
||||||
if: github.actor == github.repository_owner
|
if: github.actor == github.repository_owner
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
push: >
|
push: >
|
||||||
${{
|
${{
|
||||||
github.ref_type == 'tag'
|
env.PUSH &&
|
||||||
|| github.ref_name == github.event.repository.default_branch
|
(
|
||||||
|| startsWith(github.ref_name, 'test/')
|
github.ref_type == 'tag'
|
||||||
|| ( github.event_name == 'pull_request'
|
|| github.ref_name == github.event.repository.default_branch
|
||||||
&& env.HAS_IMAGE_REPO_ACCESS
|
|| startsWith(github.ref_name, 'test/')
|
||||||
&& contains(github.event.pull_request.labels.*.name, 'ci/push-image')
|
|| ( github.event_name == 'pull_request'
|
||||||
)
|
&& env.HAS_IMAGE_REPO_ACCESS
|
||||||
|
&& contains(github.event.pull_request.labels.*.name, 'ci/push-image')
|
||||||
|
)
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
# ensure latest base image is used
|
# ensure latest base image is used
|
||||||
@@ -215,5 +224,7 @@ jobs:
|
|||||||
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||||
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||||
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
||||||
|
${{ matrix.knockdRepoOrg && format('KNOCKD_REPO_ORG={0}', matrix.knockdRepoOrg) }}
|
||||||
|
IMAGE_AUTHOR=${{ env.IMAGE_AUTHOR }}
|
||||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||||
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ jobs:
|
|||||||
discord:
|
discord:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
if: github.repository_owner == 'itzg'
|
||||||
steps:
|
steps:
|
||||||
- name: on-publish
|
- name: on-publish
|
||||||
if: github.event_name == 'release' && github.event.action == 'published'
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|||||||
@@ -7,9 +7,13 @@ on:
|
|||||||
- labeled
|
- labeled
|
||||||
- unlabeled
|
- unlabeled
|
||||||
- closed
|
- closed
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
- labeled
|
||||||
jobs:
|
jobs:
|
||||||
notify:
|
notify:
|
||||||
|
if: github.repository_owner == 'itzg'
|
||||||
uses: itzg/github-workflows/.github/workflows/issues-notify-discord.yml@main
|
uses: itzg/github-workflows/.github/workflows/issues-notify-discord.yml@main
|
||||||
with:
|
with:
|
||||||
triageLabel: 'status/needs triage'
|
triageLabel: 'status/needs triage'
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
name: Label Sponsor Contributions
|
name: Sponsor Labeler
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types:
|
types:
|
||||||
@@ -9,15 +10,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
label-sponsor:
|
label-sponsor:
|
||||||
runs-on: ubuntu-latest
|
uses: itzg/github-workflows/.github/workflows/sponsor-labeler.yml@main
|
||||||
permissions:
|
with:
|
||||||
pull-requests: write
|
author: ${{ github.event.issue.user.login || github.event.pull_request.user.login }}
|
||||||
issues: write
|
number: ${{ github.event.issue.number || github.event.pull_request.number }}
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check if sponsor
|
|
||||||
uses: JasonEtco/is-sponsor-label-action@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
label: sponsor
|
|
||||||
@@ -7,12 +7,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
if: github.repository_owner == 'itzg'
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: Process Stale Issues
|
- name: Process Stale Issues
|
||||||
uses: actions/stale@v10
|
uses: actions/stale@v11
|
||||||
with:
|
with:
|
||||||
stale-issue-label: status/stale
|
stale-issue-label: status/stale
|
||||||
stale-pr-label: status/stale
|
stale-pr-label: status/stale
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Build docs image
|
- name: Build docs image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: docs/Dockerfile
|
file: docs/Dockerfile
|
||||||
|
|||||||
@@ -29,40 +29,48 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
# JAVA 21/25:
|
# JAVA 21/25:
|
||||||
- variant: java25
|
- variant: java25
|
||||||
baseImage: eclipse-temurin:25-jre
|
# stay aligned with build.yml
|
||||||
|
baseImage: eclipse-temurin:25-jre-noble
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
mcVersion: latest
|
mcVersion: latest
|
||||||
- variant: java25-alpine
|
- variant: java25-alpine
|
||||||
baseImage: eclipse-temurin:25-jre-alpine
|
baseImage: eclipse-temurin:25-jre-alpine
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
mcVersion: latest
|
mcVersion: latest
|
||||||
|
# For GLIBC_2.34 support (and Alpine)
|
||||||
|
knockdRepoOrg: Metalcape/knock
|
||||||
# JAVA 17:
|
# JAVA 17:
|
||||||
- variant: java17
|
- variant: java17
|
||||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||||
baseImage: eclipse-temurin:17-jre-focal
|
baseImage: eclipse-temurin:17-jre-focal
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
mcVersion: 1.20.4
|
mcVersion: 1.20.4
|
||||||
|
# For GLIBC_2.34 support
|
||||||
|
knockdRepoOrg: Metalcape/knock
|
||||||
|
# JAVA 8:
|
||||||
- variant: java8
|
- variant: java8
|
||||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
mcVersion: 1.12.2
|
mcVersion: 1.12.2
|
||||||
|
# For GLIBC_2.34 support
|
||||||
|
knockdRepoOrg: Metalcape/knock
|
||||||
# Pin version for Java 8, be sure to also set in build.yml
|
# Pin version for Java 8, be sure to also set in build.yml
|
||||||
mcHelperVersion: 1.51.3-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
env:
|
env:
|
||||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6.0.3
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
# for build-files step
|
# for build-files step
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v4.1.0
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Confirm multi-arch build
|
- name: Confirm multi-arch build
|
||||||
uses: docker/build-push-action@v7.2.0
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
# ensure latest base image is used
|
# ensure latest base image is used
|
||||||
@@ -70,10 +78,11 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BASE_IMAGE=${{ matrix.baseImage }}
|
BASE_IMAGE=${{ matrix.baseImage }}
|
||||||
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
||||||
|
${{ matrix.knockdRepoOrg && format('KNOCKD_REPO_ORG={0}', matrix.knockdRepoOrg) }}
|
||||||
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@v7.2.0
|
uses: docker/build-push-action@v7
|
||||||
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"
|
||||||
@@ -87,6 +96,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BASE_IMAGE=${{ matrix.baseImage }}
|
BASE_IMAGE=${{ matrix.baseImage }}
|
||||||
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
|
||||||
|
${{ matrix.knockdRepoOrg && format('KNOCKD_REPO_ORG={0}', matrix.knockdRepoOrg) }}
|
||||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|||||||
+7
-5
@@ -12,6 +12,8 @@ ARG EXTRA_DEB_PACKAGES=""
|
|||||||
ARG EXTRA_DNF_PACKAGES=""
|
ARG EXTRA_DNF_PACKAGES=""
|
||||||
ARG EXTRA_ALPINE_PACKAGES=""
|
ARG EXTRA_ALPINE_PACKAGES=""
|
||||||
ARG FORCE_INSTALL_PACKAGES=1
|
ARG FORCE_INSTALL_PACKAGES=1
|
||||||
|
ARG KNOCKD_VERSION=0.8.1
|
||||||
|
ARG KNOCKD_REPO_ORG=Metalcape/knock
|
||||||
RUN --mount=target=/build,source=build \
|
RUN --mount=target=/build,source=build \
|
||||||
TARGET=${TARGETARCH}${TARGETVARIANT} \
|
TARGET=${TARGETARCH}${TARGETVARIANT} \
|
||||||
/build/run.sh install-packages
|
/build/run.sh install-packages
|
||||||
@@ -26,12 +28,12 @@ ARG APPS_REV=1
|
|||||||
ARG GITHUB_BASEURL=https://github.com
|
ARG GITHUB_BASEURL=https://github.com
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/easy-add
|
# renovate: datasource=github-releases packageName=itzg/easy-add
|
||||||
ARG EASY_ADD_VERSION=0.8.14
|
ARG EASY_ADD_VERSION=0.8.15
|
||||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
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
|
RUN chmod +x /usr/bin/easy-add
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/restify
|
# renovate: datasource=github-releases packageName=itzg/restify
|
||||||
ARG RESTIFY_VERSION=1.7.16
|
ARG RESTIFY_VERSION=1.7.17
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
--var version=${RESTIFY_VERSION} --var app=restify --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
|
||||||
@@ -43,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.16.7
|
ARG MC_MONITOR_VERSION=0.16.11
|
||||||
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.0
|
ARG MC_SERVER_RUNNER_VERSION=1.15.1
|
||||||
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.61.1
|
ARG MC_HELPER_VERSION=1.63.1
|
||||||
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
|
||||||
|
|||||||
@@ -3,6 +3,13 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
# Patched knockd is only available for amd64 on Alpine, so install the package for other architectures
|
||||||
|
knockPkg=""
|
||||||
|
if [ "$TARGETARCH" != amd64 ]; then
|
||||||
|
knockPkg="knock"
|
||||||
|
echo "Installing knock package for $TARGETARCH architecture"
|
||||||
|
fi
|
||||||
|
|
||||||
# Install necessary packages
|
# Install necessary packages
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
apk add --no-cache -U \
|
apk add --no-cache -U \
|
||||||
@@ -17,6 +24,7 @@ apk add --no-cache -U \
|
|||||||
bash \
|
bash \
|
||||||
curl \
|
curl \
|
||||||
iputils \
|
iputils \
|
||||||
|
iproute2 \
|
||||||
git \
|
git \
|
||||||
git-lfs \
|
git-lfs \
|
||||||
jq \
|
jq \
|
||||||
@@ -34,13 +42,19 @@ apk add --no-cache -U \
|
|||||||
libcap \
|
libcap \
|
||||||
numactl \
|
numactl \
|
||||||
jattach \
|
jattach \
|
||||||
|
gcompat \
|
||||||
|
"$knockPkg" \
|
||||||
${EXTRA_ALPINE_PACKAGES}
|
${EXTRA_ALPINE_PACKAGES}
|
||||||
|
|
||||||
# Download and install patched knockd
|
if ! [ "$knockPkg" ]; then
|
||||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-alpine-amd64.tar.gz
|
# Download and install patched knockd
|
||||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
knockdUrl="https://github.com/${KNOCKD_REPO_ORG}/releases/download/${KNOCKD_VERSION}/knock-${KNOCKD_VERSION}-alpine-amd64.tar.gz"
|
||||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
echo "Downloading knockd from $knockdUrl"
|
||||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
curl -fsSL -o /tmp/knock.tar.gz "$knockdUrl"
|
||||||
|
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||||
|
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||||
|
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||||
|
fi
|
||||||
|
|
||||||
# Set Git credentials globally
|
# Set Git credentials globally
|
||||||
cat <<EOF >> /etc/gitconfig
|
cat <<EOF >> /etc/gitconfig
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ dnf install -y \
|
|||||||
sudo \
|
sudo \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
|
iproute \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ apt-get install -y \
|
|||||||
sudo \
|
sudo \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
iproute2 \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
git-lfs \
|
git-lfs \
|
||||||
@@ -36,8 +37,13 @@ apt-get install -y \
|
|||||||
# Clean up APT when done
|
# Clean up APT when done
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
|
if [ "$TARGETARCH" = riscv64 ]; then
|
||||||
|
KNOCKD_REPO_ORG=Opvolger/knock
|
||||||
|
fi
|
||||||
# Download and install patched knockd
|
# Download and install patched knockd
|
||||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
knockdUrl="https://github.com/${KNOCKD_REPO_ORG}/releases/download/${KNOCKD_VERSION}/knock-${KNOCKD_VERSION}-$TARGET.tar.gz"
|
||||||
|
echo "Downloading knockd from $knockdUrl"
|
||||||
|
curl -fsSL -o /tmp/knock.tar.gz "$knockdUrl"
|
||||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||||
|
|||||||
@@ -26,7 +26,10 @@ docker run -d --pull=always \
|
|||||||
|
|
||||||
By default, supported server types remove stale server libraries during installation by setting `CLEAN_SERVER_LIBRARIES` to `true`. Set `CLEAN_SERVER_LIBRARIES` to `false` to disable this cleanup if it causes unexpected behavior.
|
By default, supported server types remove stale server libraries during installation by setting `CLEAN_SERVER_LIBRARIES` to `true`. Set `CLEAN_SERVER_LIBRARIES` to `false` to disable this cleanup if it causes unexpected behavior.
|
||||||
|
|
||||||
Currently, library cleanup is supported by `TYPE=PAPER`. Other server jar types are not yet supported.
|
Currently, library cleanup is supported by
|
||||||
|
|
||||||
|
- `TYPE=PAPER`
|
||||||
|
- `TYPE=PURPUR`
|
||||||
|
|
||||||
## Running as alternate user/group ID
|
## Running as alternate user/group ID
|
||||||
|
|
||||||
@@ -176,6 +179,10 @@ such as:
|
|||||||
|
|
||||||
You may configure the use of an HTTP/HTTPS proxy by passing the proxy's "host:port" via the environment variable `PROXY`. In [the example compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/proxied/compose.yml) it references a Squid proxy. The host and port can be separately passed via the environment variables `PROXY_HOST` and `PROXY_PORT`. A `|` delimited list of hosts to exclude from proxying can be passed via `PROXY_NON_PROXY_HOSTS`.
|
You may configure the use of an HTTP/HTTPS proxy by passing the proxy's "host:port" via the environment variable `PROXY`. In [the example compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/proxied/compose.yml) it references a Squid proxy. The host and port can be separately passed via the environment variables `PROXY_HOST` and `PROXY_PORT`. A `|` delimited list of hosts to exclude from proxying can be passed via `PROXY_NON_PROXY_HOSTS`.
|
||||||
|
|
||||||
|
## Prefer IPv6 Addresses and Stack
|
||||||
|
|
||||||
|
The image can be configured to prefer IPv6 addresses and stack by setting the environment variable `PREFER_IPV6` to "true". This will ensure the Java properties `java.net.preferIPv6Addresses` and `java.net.preferIPv6Stack` are set accordingly for mc-image-helper and the Minecraft server process.
|
||||||
|
|
||||||
## Using "noconsole" option
|
## Using "noconsole" option
|
||||||
|
|
||||||
Some older versions (pre-1.14) of Spigot required `--noconsole` to be passed when detaching stdin, which can be done by setting `-e CONSOLE=FALSE`.
|
Some older versions (pre-1.14) of Spigot required `--noconsole` to be passed when detaching stdin, which can be done by setting `-e CONSOLE=FALSE`.
|
||||||
@@ -195,6 +202,13 @@ Be sure to also increase the shutdown timeout described [here for docker compose
|
|||||||
|
|
||||||
If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`.
|
If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`.
|
||||||
|
|
||||||
|
## Custom server runner
|
||||||
|
|
||||||
|
By default, the image finishes startup by exec'ing [mc-server-runner](https://github.com/itzg/mc-server-runner) to run the Minecraft server itself. This can be replaced by setting the environment variable `SERVER_RUNNER`. The arguments passed will start with ones specific to mc-server-runner, followed by `--`, and then the actual `java -jar` arguments or equivalent server entry script, such as `run.sh` for Forge.
|
||||||
|
|
||||||
|
> [!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.
|
||||||
|
|
||||||
## 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:
|
||||||
@@ -244,4 +258,4 @@ To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The
|
|||||||
|
|
||||||
```
|
```
|
||||||
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
|
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -51,4 +51,11 @@ When exec'ed interactively into the container, jattach can be invoked against th
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
jattach $(pgrep java) threaddump
|
jattach $(pgrep java) threaddump
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Networking errors
|
||||||
|
|
||||||
|
If observing network error/exceptions that involve the term "reactor.netty.http.client", then further tracing logs can be enabled by setting the following environment variables:
|
||||||
|
|
||||||
|
- `FETCH_WIRETAP` to `true`
|
||||||
|
- `HELPER_LOGGING_LEVEL` to `trace`
|
||||||
@@ -4,9 +4,9 @@ Mods and plugins can be auto-downloaded and upgraded from CurseForge by setting
|
|||||||
|
|
||||||
A specific file can be omitted from each reference to allow for auto-selecting the newest version of the selected mod/plugin. The resolved `VERSION` and `TYPE` will be taken into consideration for selecting the appropriate file.
|
A specific file can be omitted from each reference to allow for auto-selecting the newest version of the selected mod/plugin. The resolved `VERSION` and `TYPE` will be taken into consideration for selecting the appropriate file.
|
||||||
|
|
||||||
!!! warning "CurseForge API key usage"
|
!!! info "CurseForge API key usage"
|
||||||
|
|
||||||
A CurseForge API key must be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
|
A CurseForge API key is _now_ included by this image; however, you can always supply your own instead. A CurseForge API key can be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
|
||||||
|
|
||||||
## Project-file references
|
## Project-file references
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,19 @@ There are optional volume paths that can be attached to supply content to be cop
|
|||||||
`/mods`
|
`/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`.
|
: 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`.
|
||||||
|
|
||||||
|
!!! example "Loading mods from a local directory"
|
||||||
|
|
||||||
|
This is the most basic example, where `./mods` is mounted as `/mods`. If the directory with the server's mods is located somewhere else, `./mods` can be modified accordingly.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
TYPE: "NEOFORGE"
|
||||||
|
volumes:
|
||||||
|
- "./data:/data"
|
||||||
|
- "./mods:/mods"
|
||||||
|
```
|
||||||
|
|
||||||
`/config`
|
`/config`
|
||||||
: contents are synchronized into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. The source can be changed by setting `COPY_CONFIG_SRC`. Set `SYNC_SKIP_NEWER_IN_DESTINATION=false` if you want files from `/config` to take precedence over newer files in `/data/config`.
|
: contents are synchronized into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. The source can be changed by setting `COPY_CONFIG_SRC`. Set `SYNC_SKIP_NEWER_IN_DESTINATION=false` if you want files from `/config` to take precedence over newer files in `/data/config`.
|
||||||
|
|
||||||
@@ -138,6 +151,26 @@ GENERIC_PACKS_SUFFIX=.zip
|
|||||||
|
|
||||||
would expand to `https://cdn.example.org/configs-v9.0.1.zip,https://cdn.example.org/mods-v4.3.6.zip`.
|
would expand to `https://cdn.example.org/configs-v9.0.1.zip,https://cdn.example.org/mods-v4.3.6.zip`.
|
||||||
|
|
||||||
|
### Generic packs from an OCI registry
|
||||||
|
|
||||||
|
An entry can also reference a pack stored as an [OCI](https://opencontainers.org/) artifact in a container registry by prefixing it with `oci://`. The reference may use a tag or an immutable `@sha256:` digest:
|
||||||
|
|
||||||
|
```
|
||||||
|
GENERIC_PACKS=oci://ghcr.io/itzg/oci-modpack-template/tech:latest,oci://ghcr.io/itzg/oci-modpack-template/magic:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
OCI, URL, and local-path entries can be mixed in the same list and are applied in the order given. Each artifact's layers are pulled into a content-addressed cache under `/data/packs/oci`, so a digest already on disk (for example a base layer shared between packs) is not downloaded again. `GENERIC_PACKS_PREFIX`/`GENERIC_PACKS_SUFFIX`, `GENERIC_PACKS_DISABLE_MODS`, and the update/checksum behaviour below all apply to OCI entries exactly as they do to URLs.
|
||||||
|
|
||||||
|
The artifact must be a Minecraft modpack artifact (artifact type `application/vnd.itzg.minecraft.modpack.v1+json` with `…modpack.layer.v1.tar+gzip` layers); any other reference is rejected before its contents touch `/data`. Validation and registry authentication are handled by `mc-image-helper`.
|
||||||
|
|
||||||
|
For a private registry, point `GENERIC_PACKS_OCI_AUTH_FILE` at a registry login file (the `auth.json`/`config.json` produced by `docker login`, `podman login`, etc.):
|
||||||
|
|
||||||
|
```
|
||||||
|
GENERIC_PACKS_OCI_AUTH_FILE=/run/secrets/registry-auth.json
|
||||||
|
```
|
||||||
|
|
||||||
|
When it is unset, a credentials file at `~/.config/containers/auth.json` or `~/.docker/config.json` is used if present, otherwise the pull is anonymous.
|
||||||
|
|
||||||
If applying large generic packs, the update can be time-consuming. To skip the update set `SKIP_GENERIC_PACK_UPDATE_CHECK` to "true". Conversely, the generic pack(s) can be forced to be applied by setting `FORCE_GENERIC_PACK_UPDATE` to "true".
|
If applying large generic packs, the update can be time-consuming. To skip the update set `SKIP_GENERIC_PACK_UPDATE_CHECK` to "true". Conversely, the generic pack(s) can be forced to be applied by setting `FORCE_GENERIC_PACK_UPDATE` to "true".
|
||||||
|
|
||||||
The most time-consuming portion of the generic pack update is generating and comparing the SHA1 checksum. To skip the checksum generation, set `SKIP_GENERIC_PACK_CHECKSUM` to "true".
|
The most time-consuming portion of the generic pack update is generating and comparing the SHA1 checksum. To skip the checksum generation, set `SKIP_GENERIC_PACK_CHECKSUM` to "true".
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ docker run -d --pull=always \
|
|||||||
|
|
||||||
packwiz modpack definitions are processed before other mod definitions (`MODPACK`, `MODS`, etc.) to allow for additional processing/overrides you may want to perform (in case of mods not available via Modrinth/CurseForge, or you do not maintain the pack).
|
packwiz modpack definitions are processed before other mod definitions (`MODPACK`, `MODS`, etc.) to allow for additional processing/overrides you may want to perform (in case of mods not available via Modrinth/CurseForge, or you do not maintain the pack).
|
||||||
|
|
||||||
|
If the pack ships a `.env` file that you reference with `LOAD_ENV_FROM_FILE`, that file is re-loaded immediately after the packwiz installer runs, so the freshly downloaded values are applied to the remaining startup stages. Note that `TYPE` and `VERSION` are resolved earlier (before the deploy is dispatched), so a pack-provided `.env` cannot change those from within packwiz; use `LOAD_ENV_FROM_GENERIC_PACK` or `LOAD_ENV_FROM_ARCHIVE` for those.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
|
|
||||||
packwiz is pre-configured to only download server mods. If client-side mods are downloaded and cause issues, check your pack.toml configuration, and make sure any client-only mods are not set to `"both"`, but rather `"client"` for the side configuration item.
|
packwiz is pre-configured to only download server mods. If client-side mods are downloaded and cause issues, check your pack.toml configuration, and make sure any client-only mods are not set to `"both"`, but rather `"client"` for the side configuration item.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
click==8.4.1
|
click==8.4.2
|
||||||
colorama==0.4.6
|
colorama==0.4.6
|
||||||
deepmerge==2.0
|
deepmerge==2.1.0
|
||||||
ghp-import==2.1.0
|
ghp-import==2.1.0
|
||||||
griffe==2.0.2
|
griffe==2.1.0
|
||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
Markdown==3.10.2
|
Markdown==3.10.2
|
||||||
MarkupSafe==3.0.3
|
MarkupSafe==3.0.3
|
||||||
@@ -10,16 +10,16 @@ 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.4
|
mkdocstrings==1.0.6
|
||||||
mkdocstrings-python==2.0.4
|
mkdocstrings-python==2.0.5
|
||||||
packaging==26.2
|
packaging==26.2
|
||||||
pathspec==1.1.1
|
pathspec==1.1.1
|
||||||
platformdirs==4.10.0
|
platformdirs==4.11.0
|
||||||
Pygments==2.20.0
|
Pygments==2.20.0
|
||||||
pymdown-extensions==10.21.3
|
pymdown-extensions==11.0.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.45
|
zensical==0.0.51
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
|
|||||||
|
|
||||||
## API Key
|
## API Key
|
||||||
|
|
||||||
!!! warning "CurseForge API key usage"
|
!!! info "CurseForge API key usage"
|
||||||
|
|
||||||
A CurseForge API key is **required** to use this feature. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
|
A CurseForge API key is _now_ included by this image; however, you can always supply your own instead. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
|
||||||
|
|
||||||
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`. Refer to [this compose file reference section](https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution) for more information.
|
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`. Refer to [this compose file reference section](https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution) for more information.
|
||||||
|
|
||||||
@@ -79,13 +79,11 @@ Pass a page URL to the modpack or a specific file with `CF_PAGE_URL` such as the
|
|||||||
environment:
|
environment:
|
||||||
# ...
|
# ...
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
# allocate from https://console.curseforge.com/ and set in .env file
|
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||||
```
|
```
|
||||||
|
|
||||||
```title="Using docker run"
|
```title="Using docker run"
|
||||||
docker run -e CF_API_KEY=${CF_API_KEY} -e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
docker run -e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||||
```
|
```
|
||||||
|
|
||||||
Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the short identifier visible in the URL after "/modpacks/", such as
|
Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the short identifier visible in the URL after "/modpacks/", such as
|
||||||
@@ -98,13 +96,11 @@ Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the
|
|||||||
environment:
|
environment:
|
||||||
# ...
|
# ...
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
# allocate from https://console.curseforge.com/ and set in .env file
|
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
CF_SLUG: all-the-mods-8
|
CF_SLUG: all-the-mods-8
|
||||||
```
|
```
|
||||||
|
|
||||||
```title="Using docker run"
|
```title="Using docker run"
|
||||||
docker run -e CF_API_KEY=${CF_API_KEY} -e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
|
docker run -e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pinning modpack and mod loader versions
|
### Pinning modpack and mod loader versions
|
||||||
@@ -148,7 +144,6 @@ By default, AUTO_CURSEFORGE will use the exact modloader version declared by the
|
|||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
CF_SLUG: all-the-mods-8
|
CF_SLUG: all-the-mods-8
|
||||||
CF_MOD_LOADER_VERSION: "43.4.22"
|
CF_MOD_LOADER_VERSION: "43.4.22"
|
||||||
```
|
```
|
||||||
@@ -197,8 +192,6 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
# allocate from https://console.curseforge.com/ and set in .env file
|
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
CF_MODPACK_MANIFEST: /manifests/manifest.json
|
CF_MODPACK_MANIFEST: /manifests/manifest.json
|
||||||
CF_SLUG: "custom"
|
CF_SLUG: "custom"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Configuration options with defaults:
|
|||||||
|
|
||||||
## Set Modpack version
|
## Set Modpack version
|
||||||
|
|
||||||
As GTNH is a Minecraft 1.7.10 modpack, when using it your minecraft version is set to 1.7.10 by default. The [modpack version](https://www.gtnewhorizons.com/downloads/) can be selected by setting `GTNH_PACK_VERSION` to `latest`, `latest-dev` or any specific version number. `latest` will automatically select the latest full release version available and deploy the server with it (Note: this will also automatically update the server on startup). `latest-dev` does the same but selects the latest version marked as beta or RC (it won't select a full release version even if a newer exist). The third (and recommended) option is setting the server to a specific version like `2.8.1` to manage updates manually.
|
As GTNH is a Minecraft 1.7.10 modpack, when using it your minecraft version is set to 1.7.10 by default. The [modpack version](https://www.gtnewhorizons.com/downloads/) can be selected by setting `GTNH_PACK_VERSION` to `latest`, `latest-beta` (formerly `latest-dev`) or any specific version number. `latest` will automatically select the latest full release version available and deploy the server with it (Note: this will also automatically update the server on startup). `latest-beta` does the same but selects the latest version marked as beta or RC (it won't select a full release version even if a newer exist). The third (and recommended) option is setting the server to a specific version like `2.8.1` to manage updates manually.
|
||||||
|
|
||||||
> To actively prevent an update from happening you can set the environment variable `SKIP_GTNH_UPDATE_CHECK` to true this will prevent any update check from running, but will also prevent the server install from running, so just set it after the initial setup.
|
> To actively prevent an update from happening you can set the environment variable `SKIP_GTNH_UPDATE_CHECK` to true this will prevent any update check from running, but will also prevent the server install from running, so just set it after the initial setup.
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ For optimal performance choose java25 with GTNH 2.8.0 and later.
|
|||||||
|
|
||||||
## Config backups
|
## Config backups
|
||||||
|
|
||||||
During version upgrade, the server will replace all config files to make sure all new features are setup as intended. The old config files are stored in a backup folder in the data directory, for you to use as reference for manual reapplication of your changed settings. Set the environment variable `GTNH_DELETE_BACKUPS` to true to delete all backup folders at startup.
|
During version upgrade, the server will replace all config files to make sure all new features are setup as intended. The old config files are stored in a backup folder in the data directory, for you to use as reference for manual reapplication of your changed settings. The folder name starts with `gtnh-upgrade-` followed by a timestamp. Set the environment variable `GTNH_DELETE_BACKUPS` to true to delete all backup folders at startup.
|
||||||
|
|
||||||
## server.properties defaults
|
## server.properties defaults
|
||||||
|
|
||||||
@@ -52,3 +52,11 @@ To deliver the intended GTNH by default, when running a GTNH server, the followi
|
|||||||
With java 17+ the server starts with `-Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar`.
|
With java 17+ the server starts with `-Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar`.
|
||||||
|
|
||||||
With java 8 the server stars with `-XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseCodeCacheFlushing -Dfml.readTimeout=180 -jar forge-1.7.10-10.13.4.1614-1.7.10-universal.jar`
|
With java 8 the server stars with `-XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseCodeCacheFlushing -Dfml.readTimeout=180 -jar forge-1.7.10-10.13.4.1614-1.7.10-universal.jar`
|
||||||
|
|
||||||
|
## Developer Versions
|
||||||
|
|
||||||
|
To run the nightly developer builds of GTNH, set the environment variable `GTNH_USE_DAILY_BUILD` to true and set `GTNH_PACK_VERSION` either to `latest` or a specific run ID of the build workflow. The run ID can be found in the [GTNH GitHub Actions](https://github.com/GTNewHorizons/DreamAssemblerXXL/actions) page of the DreamAssemblerXXL repository. The run ID is the number in the URL of the workflow run, for example `123456789`.
|
||||||
|
|
||||||
|
Since downloads require authentication, you will also need to set the environment variable `GH_TOKEN` to a valid GitHub Personal Access Token with `public_repo` scope. You can create a token in your [GitHub settings](https://github.com/settings/tokens) page. Be sure to keep your token secret and do not share it with anyone. The token is only used to download the developer builds and is not stored anywhere in the server (except in the environment variables).
|
||||||
|
|
||||||
|
Keep in mind that developer builds are not stable and may contain bugs or incomplete features. Use them at your own risk. It is recommended to use the latest stable release for production servers!
|
||||||
|
|||||||
+14
-14
@@ -10,20 +10,20 @@ or explicitly include the tag, such as
|
|||||||
|
|
||||||
where `<tag>` refers to the first column of this table:
|
where `<tag>` refers to the first column of this table:
|
||||||
|
|
||||||
| Tag | Java version | Linux | JVM Type | Architecture | Note |
|
| Tag | Java version | Linux | JVM Type | Architecture | Note |
|
||||||
|----------------|--------------|--------|--------------------|---------------------|------|
|
|---------------|--------------|--------|-------------|-----------------------|------|
|
||||||
| latest | 25 | Ubuntu | Hotspot | amd64, arm64 | |
|
| latest | 25 | Ubuntu | Hotspot | amd64, arm64, riscv64 | |
|
||||||
| stable | 25 | Ubuntu | Hotspot | amd64, arm64 | |
|
| stable | 25 | Ubuntu | Hotspot | amd64, arm64, riscv64 | |
|
||||||
| java25 | 25 | Ubuntu | Hotspot | amd64, arm64 | |
|
| java25 | 25 | Ubuntu | Hotspot | amd64, arm64, riscv64 | |
|
||||||
| java25-alpine | 25 | Alpine | Hotspot | amd64, arm64 | |
|
| java25-alpine | 25 | Alpine | Hotspot | amd64, arm64 | |
|
||||||
| java25-jdk | 25 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
| java25-jdk | 25 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
||||||
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||||
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
||||||
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | |
|
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | |
|
||||||
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||||
| java16 | 16 | Ubuntu | Hotspot | amd64, arm64, armv7 | (1) |
|
| java16 | 16 | Ubuntu | Hotspot | amd64, arm64, armv7 | (1) |
|
||||||
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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/all-of-fabric-7
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-of-fabric-7
|
||||||
# CF_FILENAME_MATCHER: 1.2.2
|
# CF_FILENAME_MATCHER: 1.2.2
|
||||||
CF_OVERRIDES_EXCLUSIONS: |
|
CF_OVERRIDES_EXCLUSIONS: |
|
||||||
|
|||||||
@@ -8,11 +8,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
MOD_PLATFORM: 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_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"
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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/all-the-mods-8
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||||
# CF_FILENAME_MATCHER: "1.1.0"
|
# CF_FILENAME_MATCHER: "1.1.0"
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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/all-the-mods-9
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9
|
||||||
# Optional: select a specific version/file
|
# Optional: select a specific version/file
|
||||||
#CF_FILENAME_MATCHER: "0.2.34"
|
#CF_FILENAME_MATCHER: "0.2.34"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ services:
|
|||||||
EULA: true
|
EULA: true
|
||||||
ALLOW_FLIGHT: true
|
ALLOW_FLIGHT: true
|
||||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
CF_SLUG: craftoria
|
CF_SLUG: craftoria
|
||||||
MOTD: |
|
MOTD: |
|
||||||
A %TYPE% server on %VERSION%
|
A %TYPE% server on %VERSION%
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
# Allocate API key from https://console.curseforge.com/
|
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
# Example of overriding modloader version for a Fabric modpack
|
# Example of overriding modloader version for a Fabric modpack
|
||||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||||
CF_SLUG: "cobblemon-fabric"
|
CF_SLUG: "cobblemon-fabric"
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
TYPE: AUTO_CURSEFORGE
|
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
|
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.
|
# This modpack includes an override client-side only mod that will prevent the server from starting.
|
||||||
# For more information on override exclusions see:
|
# For more information on override exclusions see:
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_MODPACK_MANIFEST: /manifests/manifest.json
|
CF_MODPACK_MANIFEST: /manifests/manifest.json
|
||||||
CF_SLUG: "custom"
|
CF_SLUG: "custom"
|
||||||
MEMORY: 2G
|
MEMORY: 2G
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_SLUG: one-block-modded
|
CF_SLUG: one-block-modded
|
||||||
# Modpack client zip must be manually downloaded from
|
# Modpack client zip must be manually downloaded from
|
||||||
# https://www.curseforge.com/minecraft/modpacks/one-block-modded
|
# https://www.curseforge.com/minecraft/modpacks/one-block-modded
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_SLUG: the-pixelmon-modpack
|
CF_SLUG: the-pixelmon-modpack
|
||||||
CF_FILENAME_MATCHER: "9.1.2"
|
CF_FILENAME_MATCHER: "9.1.2"
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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/prominence-2-rpg
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg
|
||||||
CF_FILENAME_MATCHER: "2.8.7"
|
CF_FILENAME_MATCHER: "2.8.7"
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
|
|||||||
@@ -7,11 +7,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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/roguelike-adventures-and-dungeons-2
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons-2
|
||||||
# Optional: select a specific version/file
|
# Optional: select a specific version/file
|
||||||
#CF_FILENAME_MATCHER: "0.2.34"
|
#CF_FILENAME_MATCHER: "0.2.34"
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ services:
|
|||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
CF_SLUG: skyfactory-4
|
CF_SLUG: skyfactory-4
|
||||||
CF_FILENAME_MATCHER: 4.2.4
|
CF_FILENAME_MATCHER: 4.2.4
|
||||||
CF_API_KEY: ${CF_API_KEY}
|
|
||||||
MEMORY: 3G
|
MEMORY: 3G
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ services:
|
|||||||
# Comment out the following to get the latest version or pick a version from
|
# Comment out the following to get the latest version or pick a version from
|
||||||
# https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/all?page=1&pageSize=20
|
# https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/all?page=1&pageSize=20
|
||||||
CF_FILENAME_MATCHER: 5.0.8
|
CF_FILENAME_MATCHER: 5.0.8
|
||||||
# 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
|
MEMORY: 4G
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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/minecraft-eternal/files/4102634
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/minecraft-eternal/files/4102634
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_FORCE_SYNCHRONIZE: "true"
|
CF_FORCE_SYNCHRONIZE: "true"
|
||||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560
|
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_SLUG: vault-hunters-1-18-2
|
CF_SLUG: vault-hunters-1-18-2
|
||||||
MOTD: "§4----- §2 Vault Hunters: 1.18.2 §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
|
MEMORY: 6G # 4G for base server + 2G per player
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_SLUG: better-mc-fabric-bmc1
|
CF_SLUG: better-mc-fabric-bmc1
|
||||||
# CF_FILENAME_MATCHER: v18.5
|
# CF_FILENAME_MATCHER: v18.5
|
||||||
MEMORY: 4G
|
MEMORY: 4G
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
TYPE: FORGE
|
TYPE: FORGE
|
||||||
# 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
|
VERSION: 1.19.2
|
||||||
CURSEFORGE_FILES: |
|
CURSEFORGE_FILES: |
|
||||||
geckolib # some comment
|
geckolib # some comment
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
name: mc-rconcmd
|
||||||
services:
|
services:
|
||||||
minecraft:
|
minecraft:
|
||||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
image: itzg/minecraft-server
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -12,11 +13,6 @@ services:
|
|||||||
CURSEFORGE_FILES: |
|
CURSEFORGE_FILES: |
|
||||||
fabric-api
|
fabric-api
|
||||||
chunky-pregenerator
|
chunky-pregenerator
|
||||||
# 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.
|
# 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.
|
# This is versus '|' that will leaving with two empty strings at top and bottom.
|
||||||
RCON_CMDS_STARTUP: |-
|
RCON_CMDS_STARTUP: |-
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ services:
|
|||||||
# GTNH_DELETE_BACKUPS: true
|
# GTNH_DELETE_BACKUPS: true
|
||||||
# Use to prevent updates
|
# Use to prevent updates
|
||||||
# SKIP_GTNH_UPDATE_CHECK: true
|
# SKIP_GTNH_UPDATE_CHECK: true
|
||||||
|
# Enable and set Token for daily builds
|
||||||
|
# GTNH_USE_DAILY_BUILD: true
|
||||||
|
# GH_TOKEN: mytoken
|
||||||
MEMORY: 6G
|
MEMORY: 6G
|
||||||
# Bring in standard extra mods described at https://wiki.gtnewhorizons.com/wiki/Additional_Mods
|
# Bring in standard extra mods described at https://wiki.gtnewhorizons.com/wiki/Additional_Mods
|
||||||
# MODS: |
|
# MODS: |
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ services:
|
|||||||
EULA: true
|
EULA: true
|
||||||
TYPE: KETTING
|
TYPE: KETTING
|
||||||
VERSION: 1.20.1
|
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
|
CURSEFORGE_FILES: https://www.curseforge.com/minecraft/mc-mods/aquaculture
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
@@ -4,11 +4,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: 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_SLUG: rlcraft
|
CF_SLUG: rlcraft
|
||||||
CF_FILENAME_MATCHER: 2.9.3
|
CF_FILENAME_MATCHER: 2.9.3
|
||||||
CF_FORCE_SYNCHRONIZE: true
|
CF_FORCE_SYNCHRONIZE: true
|
||||||
|
|||||||
+3
-3
@@ -5,7 +5,7 @@
|
|||||||
"java": "25",
|
"java": "25",
|
||||||
"distribution": "ubuntu",
|
"distribution": "ubuntu",
|
||||||
"jvm": "hotspot",
|
"jvm": "hotspot",
|
||||||
"architectures": ["amd64", "arm64"],
|
"architectures": ["amd64", "arm64", "riscv64"],
|
||||||
"lts": true
|
"lts": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"java": "25",
|
"java": "25",
|
||||||
"distribution": "ubuntu",
|
"distribution": "ubuntu",
|
||||||
"jvm": "hotspot",
|
"jvm": "hotspot",
|
||||||
"architectures": ["amd64", "arm64"],
|
"architectures": ["amd64", "arm64", "riscv64"],
|
||||||
"lts": true
|
"lts": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
"java": "25",
|
"java": "25",
|
||||||
"distribution": "ubuntu",
|
"distribution": "ubuntu",
|
||||||
"jvm": "hotspot",
|
"jvm": "hotspot",
|
||||||
"architectures": ["amd64", "arm64"]
|
"architectures": ["amd64", "arm64", "riscv64"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tag": "java25-alpine",
|
"tag": "java25-alpine",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if ! mc-image-helper network-interfaces --check="$AUTOPAUSE_KNOCK_INTERFACE" ; t
|
|||||||
autopause_error_loop
|
autopause_error_loop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
knockdArgs=(-c /tmp/knockd-config.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE")
|
knockdArgs=(-c /data/.knockd.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE")
|
||||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||||
knockdArgs+=(-D)
|
knockdArgs+=(-D)
|
||||||
fi
|
fi
|
||||||
|
|||||||
+11
-5
@@ -24,13 +24,13 @@ log "Autopause functionality enabled"
|
|||||||
|
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
cp /image/knockd-config.cfg /tmp/knockd-config.cfg
|
cp /image/knockd-config.cfg /data/.knockd.cfg
|
||||||
|
|
||||||
function updatePort() {
|
function updatePort() {
|
||||||
regseq="^\s*sequence\s*=\s*$1\s*$"
|
regseq="^\s*sequence\s*=\s*$1\s*$"
|
||||||
linenum=$(grep -nm${2} sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
|
linenum=$(grep -nm${2} sequence /data/.knockd.cfg | cut -d : -f 1 | tail -n1)
|
||||||
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
|
if ! [[ $(awk "NR==$linenum" /data/.knockd.cfg) =~ $regseq ]]; then
|
||||||
sed -i "${linenum}s/sequence.*/sequence = $1/" /tmp/knockd-config.cfg
|
sed -i "${linenum}s/sequence.*/sequence = $1/" /data/.knockd.cfg
|
||||||
log "Updated $3 port in knockd config"
|
log "Updated $3 port in knockd config"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -67,6 +67,12 @@ fi
|
|||||||
# seq_cooldown cannot be larger than AUTOPAUSE_TIMEOUT_KN, otherwise the server may
|
# seq_cooldown cannot be larger than AUTOPAUSE_TIMEOUT_KN, otherwise the server may
|
||||||
# become paused while knockd is still ignoring packets, preventing players from joining.
|
# become paused while knockd is still ignoring packets, preventing players from joining.
|
||||||
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
|
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
|
||||||
sed -i "s/\(seq_cooldown *= *\).*/\1$COOLDOWN/" /tmp/knockd-config.cfg
|
sed -i "s/\(seq_cooldown *= *\).*/\1$COOLDOWN/" /data/.knockd.cfg
|
||||||
|
|
||||||
|
if isDebugging; then
|
||||||
|
echo "Autopause configuration: ======================================"
|
||||||
|
cat /data/.knockd.cfg
|
||||||
|
echo "==============================================================="
|
||||||
|
fi
|
||||||
|
|
||||||
"$(dirname "$0")/auto/autopause-daemon.sh" &
|
"$(dirname "$0")/auto/autopause-daemon.sh" &
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ IFS=$'\n\t'
|
|||||||
|
|
||||||
: "${EULA:=}"
|
: "${EULA:=}"
|
||||||
: "${PROXY:=}"
|
: "${PROXY:=}"
|
||||||
|
: "${PREFER_IPV6:=false}"
|
||||||
: "${ENABLE_AUTOPAUSE:=false}"
|
: "${ENABLE_AUTOPAUSE:=false}"
|
||||||
: "${ENABLE_AUTOSTOP:=false}"
|
: "${ENABLE_AUTOSTOP:=false}"
|
||||||
: "${RCON_CMDS_STARTUP:=}"
|
: "${RCON_CMDS_STARTUP:=}"
|
||||||
@@ -28,11 +29,22 @@ shopt -s nullglob
|
|||||||
|
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
|
if isTrue "$PREFER_IPV6"; then
|
||||||
|
MC_IMAGE_HELPER_OPTS+="-Djava.net.preferIPv6Addresses=true -Djava.net.preferIPv6Stack=true"
|
||||||
|
export MC_IMAGE_HELPER_OPTS
|
||||||
|
JVM_DD_OPTS+="java.net.preferIPv6Addresses=true java.net.preferIPv6Stack=true"
|
||||||
|
export JVM_DD_OPTS
|
||||||
|
fi
|
||||||
|
|
||||||
if (( $(mc-image-helper java-release) >= 17 )); then
|
if (( $(mc-image-helper java-release) >= 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
|
||||||
|
|
||||||
|
if [[ $(getDistro) == alpine ]]; then
|
||||||
|
export LD_PRELOAD=/lib/libgcompat.so.0
|
||||||
|
fi
|
||||||
|
|
||||||
export HOME=/data
|
export HOME=/data
|
||||||
|
|
||||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ set -eu
|
|||||||
: "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H
|
: "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H
|
||||||
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
||||||
: "${CF_MOD_LOADER_VERSION:=}" # Override mod loader version
|
: "${CF_MOD_LOADER_VERSION:=}" # Override mod loader version
|
||||||
|
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
|
||||||
|
|
||||||
resultsFile=/data/.install-curseforge.env
|
resultsFile=/data/.install-curseforge.env
|
||||||
|
|
||||||
@@ -46,6 +47,7 @@ args=(
|
|||||||
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
|
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
|
||||||
--force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER"
|
--force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER"
|
||||||
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
|
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
|
||||||
|
--use-http2="$CF_USE_HTTP2"
|
||||||
)
|
)
|
||||||
setArg() {
|
setArg() {
|
||||||
arg="${1?}"
|
arg="${1?}"
|
||||||
|
|||||||
+196
-106
@@ -7,13 +7,16 @@
|
|||||||
function getGTNHdownloadPath(){
|
function getGTNHdownloadPath(){
|
||||||
gtnh_download_path=""
|
gtnh_download_path=""
|
||||||
local release_object=""
|
local release_object=""
|
||||||
local current_java_version=$(mc-image-helper java-release)
|
|
||||||
|
|
||||||
# Select release JSON object
|
# Select release JSON object
|
||||||
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
# latest-dev will be removed in the future, but is still supported for now.
|
||||||
|
if [ "$GTNH_PACK_VERSION" == "latest-dev" ] || [ "$GTNH_PACK_VERSION" == "latest-beta" ]; then
|
||||||
|
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
||||||
|
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
||||||
|
fi
|
||||||
if ! release_object="$(
|
if ! release_object="$(
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||||
| jq -r '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Beta release"))|.[-1]'
|
| 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"
|
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -22,7 +25,7 @@ function getGTNHdownloadPath(){
|
|||||||
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
||||||
if ! release_object="$(
|
if ! release_object="$(
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||||
| jq -r '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]'
|
| 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"
|
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -31,38 +34,92 @@ function getGTNHdownloadPath(){
|
|||||||
else
|
else
|
||||||
if ! release_object="$(
|
if ! release_object="$(
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||||
| jq -r --arg USRIN $GTNH_PACK_VERSION '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
| 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"
|
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
log "Selected $(jq -r '.key' <<< "$release_object") as matching version for download."
|
log "Selected $(jq -r '.key' <<< "$release_object") as matching version for download."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z $release_object ]]; then
|
||||||
|
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Select compatible server files for java version
|
# Select compatible server files for java version
|
||||||
if (( current_java_version == 8 )); then
|
if (( java_version == 8 )); then
|
||||||
gtnh_download_path=$(jq -r '.value.server.java8Url' <<< "$release_object")
|
gtnh_download_path=$(jq -r '.value.server.java8Url' <<< "$release_object")
|
||||||
log "Use GTNH Server Java 8 release."
|
log "Use GTNH Server Java 8 release."
|
||||||
|
|
||||||
elif (( current_java_version >= 17 )); then
|
elif (( java_version >= 17 )); then
|
||||||
if (( current_java_version > $(jq '.value.maxJavaVersion' <<< "$release_object") )); then
|
if (( java_version > $(jq '.value.maxJavaVersion' <<< "$release_object") )); then
|
||||||
logError "Container Java version $current_java_version is not supported by GTNH. Try an older release."
|
logError "Container Java version $java_version is not supported by GTNH. Try an older release."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gtnh_download_path=$(jq -r '.value.server.java17_2XUrl' <<< "$release_object")
|
gtnh_download_path=$(jq -r '.value.server.java17_2XUrl' <<< "$release_object")
|
||||||
log "Use GTNH Server Java 17+ release."
|
log "Use GTNH Server Java 17+ release."
|
||||||
|
|
||||||
else
|
|
||||||
logError "Container Java version $current_java_version is not supported by GTNH."
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z $gtnh_download_path ]]; then
|
||||||
|
logError "Server files not found! Please check if the selected GTNH_PACK_VERSION=$GTNH_PACK_VERSION is valid."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
debug "Download source URL: $gtnh_download_path"
|
debug "Download source URL: $gtnh_download_path"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getGTNHdownloadOptions(){
|
||||||
|
# Used for GTNH daily build downloads, to pass additional options to the download command.
|
||||||
|
gtnh_download_options=()
|
||||||
|
# Used for dryrun check
|
||||||
|
gtnh_download_path=""
|
||||||
|
|
||||||
|
# Check if GH_TOKEN is set for daily builds
|
||||||
|
if [ -z "$GH_TOKEN" ]; then
|
||||||
|
logError "GH_TOKEN environment variable must be set to use daily builds."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
gtnh_download_options+=( --output-filename )
|
||||||
|
|
||||||
|
# prepare download options as an array to safely append patterns
|
||||||
|
if [ "$GTNH_PACK_VERSION" == "latest" ] || [ "$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."
|
||||||
|
fi
|
||||||
|
gtnh_download_options+=( --workflow=daily-modpack-build.yml )
|
||||||
|
log "Using latest daily build for GTNH server files."
|
||||||
|
elif [ "$GTNH_PACK_VERSION" == "latest-beta" ]; then
|
||||||
|
gtnh_download_options+=( --workflow=daily-modpack-build.yml )
|
||||||
|
logWarning "Using daily build instead of latest beta release for GTNH server files. If this is not intended, set GTNH_USE_DAILY_BUILD=false to use the latest beta release instead."
|
||||||
|
else
|
||||||
|
gtnh_download_options+=( --run-id="$GTNH_PACK_VERSION" )
|
||||||
|
log "Using specific daily build run ID $GTNH_PACK_VERSION for GTNH server files."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Select compatible server files for java version
|
||||||
|
if (( java_version == 8 )); then
|
||||||
|
log "Use GTNH Server Java 8 release."
|
||||||
|
gtnh_download_options+=( --artifact-pattern='GTNH-daily-\d{4}-\d{2}-\d{2}\+\d+-server-java8\.zip' )
|
||||||
|
|
||||||
|
elif (( java_version >= 17 )); then
|
||||||
|
log "Use GTNH Server Java 17+ release."
|
||||||
|
gtnh_download_options+=( --artifact-pattern='GTNH-daily-\d{4}-\d{2}-\d{2}\+\d+-server-java17-\d{2}\.zip' )
|
||||||
|
fi
|
||||||
|
|
||||||
|
debug "GTNH daily build download options: ${gtnh_download_options[*]}"
|
||||||
|
|
||||||
|
if ! gtnh_download_path=$(mc-image-helper github download-artifact --no-download "${gtnh_download_options[@]}" GTNewHorizons/DreamAssemblerXXL); then
|
||||||
|
logError "Failed to find a matching daily build for GTNH server files with the specified options."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
debug "GTNH daily build download path: $gtnh_download_path"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function deleteGTNHbackup(){
|
function deleteGTNHbackup(){
|
||||||
log "Start deleting all config backups"
|
log "Start deleting all config backups"
|
||||||
if ! find . -maxdepth 1 -type d -name 'gtnh-upgrade-*' -exec rm -rf {} + ; then
|
if ! find . -maxdepth 1 -type d -name 'gtnh-upgrade-*' -exec rm -rf {} + ; then
|
||||||
@@ -70,80 +127,134 @@ function deleteGTNHbackup(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function downloadGTNH(){
|
||||||
|
gtnh_download=""
|
||||||
|
base_dir=/data/.tmp/gtnh_base
|
||||||
|
|
||||||
|
debug "Creating temporary /data/.tmp/packs folder for GTNH download"
|
||||||
|
mkdir -p /data/.tmp/packs
|
||||||
|
trap 'rm -rf /data/.tmp' EXIT
|
||||||
|
mkdir -p "${base_dir}"
|
||||||
|
|
||||||
|
if isTrue "$GTNH_USE_DAILY_BUILD"; then
|
||||||
|
log "Downloading Daily Build for GTNH server files."
|
||||||
|
# gtnh_download_options is injecting download parameters -> (--workflow or --run-id) and --artifact-pattern
|
||||||
|
if ! gtnh_download=$(mc-image-helper github download-artifact -o=$base_dir --unzip "${gtnh_download_options[@]}" GTNewHorizons/DreamAssemblerXXL); then
|
||||||
|
logError "Failed to download Daily Build for GTNH server files."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
log "Downloading $gtnh_download_path."
|
||||||
|
if ! gtnh_download=$(mc-image-helper get -o /data/.tmp/packs --output-filename --skip-up-to-date "$gtnh_download_path"); then
|
||||||
|
logError "Failed to download $gtnh_download_path"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
debug "Downloaded GTNH server files to $gtnh_download"
|
||||||
|
|
||||||
|
# Unpacking Server files into temporary directory
|
||||||
|
log "Unpacking Server Files into $base_dir"
|
||||||
|
extract "${gtnh_download}" "${base_dir}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove any eula file since container manages it
|
||||||
|
debug "Removing eula.txt from $base_dir"
|
||||||
|
rm -f "${base_dir}/eula.txt"
|
||||||
|
|
||||||
|
# recalculate the actual base directory of content
|
||||||
|
if ! base_dir=$(mc-image-helper find \
|
||||||
|
--max-depth=3 --type=directory --name=mods,config \
|
||||||
|
--only-shallowest --fail-no-matches --format '%h' \
|
||||||
|
"$base_dir"); then
|
||||||
|
logError "Unable to find content base of downloaded Server Files"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
debug "Base directory of unpacked Server Files: $base_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateGTNHresource(){
|
||||||
|
local resource="$1"
|
||||||
|
local new_resource="$2"
|
||||||
|
log "Trying to update $resource"
|
||||||
|
|
||||||
|
if [[ -z "$resource" ]]; then
|
||||||
|
logWarning "No resource specified for update"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -e "$resource" ]]; then
|
||||||
|
log "Deleting existing resource: $resource"
|
||||||
|
if ! rm -rf "$resource"; then
|
||||||
|
logError "Failed to delete resource: $resource"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$new_resource" ]]; then
|
||||||
|
log "Copying $new_resource to /data"
|
||||||
|
if ! cp -r "$new_resource" "/data/"; then
|
||||||
|
logError "Failed to copy $new_resource to /data"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [[ -f "$new_resource" ]]; then
|
||||||
|
log "Copying $new_resource to /data"
|
||||||
|
if ! cp "$new_resource" "/data/"; then
|
||||||
|
logError "Failed to copy $new_resource to /data"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
logWarning "Resource update failed: $new_resource does not exist!"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
function updateGTNH(){
|
function updateGTNH(){
|
||||||
# Get the current date and time
|
# Get the current date and time
|
||||||
current_datetime=$(date +%Y-%m-%dT%H:%M)
|
local current_datetime=""
|
||||||
|
current_datetime=$(date +%Y-%m-%dT+%H%M)
|
||||||
|
|
||||||
# Define folders and files to update
|
# Define folders and files to update
|
||||||
folders_to_update=("libraries" "mods" "resources" "scripts")
|
# base_dir is already defined in handleGTNH function
|
||||||
files_to_update=("lwjgl3ify-forgePatches.jar" "java9args.txt" "startserver-java9.bat" "startserver-java9.sh" "forge-1.7.10-10.13.4.1614-1.7.10-universal.jar" "startserver.bat" "startserver.sh" "server-icon.png")
|
local folders_to_update=("libraries" "mods" "resources" "scripts")
|
||||||
config_folder="config"
|
local files_to_update=("lwjgl3ify-forgePatches.jar" "java9args.txt" "startserver-java9.bat" "startserver-java9.sh" "forge-1.7.10-10.13.4.1614-1.7.10-universal.jar" "startserver.bat" "startserver.sh" "server-icon.png")
|
||||||
backup_folder="/data/gtnh-upgrade-$current_datetime"
|
local config_folder="config"
|
||||||
journey_map_folder="JourneyMapServer"
|
local backup_folder="/data/gtnh-upgrade-$current_datetime"
|
||||||
|
local journey_map_folder="JourneyMapServer"
|
||||||
# Delete specified folders if they exist
|
|
||||||
for folder in "${folders_to_update[@]}"; do
|
|
||||||
folder_path="/data/$folder"
|
|
||||||
if [[ -d "$folder_path" ]]; then
|
|
||||||
log "Deleting folder: $folder_path"
|
|
||||||
rm -rf "$folder_path"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Delete specific files if they exist
|
|
||||||
for file in "${files_to_update[@]}"; do
|
|
||||||
file_path="/data/$file"
|
|
||||||
if [[ -f "$file_path" ]]; then
|
|
||||||
log "Deleting file: $file_path"
|
|
||||||
rm -f "$file_path"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Backup the config folder
|
# Backup the config folder
|
||||||
if [[ -d "/data/$config_folder" ]]; then
|
if [[ -d "/data/$config_folder" ]]; then
|
||||||
log "Creating backup of /data/$config_folder at $backup_folder"
|
log "Creating backup of /data/$config_folder at $backup_folder"
|
||||||
cp -r "/data/$config_folder" "$backup_folder"
|
cp -r "/data/$config_folder" "$backup_folder"
|
||||||
log "Deleting original /data/$config_folder"
|
|
||||||
rm -rf "/data/$config_folder"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Updating the required folders in data directory
|
# Update resources from unpacked server files to /data
|
||||||
for folder in "${folders_to_update[@]}" "$config_folder"; do
|
for resource in "${folders_to_update[@]}" "$config_folder" "${files_to_update[@]}"; do
|
||||||
if [[ -d "$base_dir/$folder" ]]; then
|
local resource_path="/data/$resource"
|
||||||
log "Copying $folder to /data"
|
local new_resource_path="$base_dir/$resource"
|
||||||
cp -r "$base_dir/$folder" "/data/"
|
|
||||||
else
|
|
||||||
logWarning "Folder $folder not found in the unzipped data!"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Copy specific files to the /data directory
|
|
||||||
for file in "${files_to_update[@]}"; do
|
|
||||||
if [[ -f "$base_dir/$file" ]]; then
|
|
||||||
log "Copying $file to /data"
|
|
||||||
cp "$base_dir/$file" "/data/"
|
|
||||||
else
|
|
||||||
logWarning "File $file not found in the unzipped data!"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Ensure the config folder exists
|
debug "Updating resource: $resource_path with new resource: $new_resource_path"
|
||||||
if [[ ! -d "$config_folder" ]]; then
|
updateGTNHresource "$resource_path" "$new_resource_path"
|
||||||
log "$config_folder does not exist. Creating it now."
|
done
|
||||||
mkdir -p "$config_folder"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Restore JourneyMapServer folder from backup
|
# Restore JourneyMapServer folder from backup
|
||||||
if [[ -d "$backup_folder/$journey_map_folder" ]]; then
|
if [[ -d "$backup_folder/$journey_map_folder" ]]; then
|
||||||
log "Restoring $journey_map_folder to $config_folder"
|
if [[ ! -d "/data/$config_folder" ]]; then
|
||||||
cp -r "$backup_folder/$journey_map_folder" "$config_folder/"
|
log "/data/$config_folder folder does not exist. Creating it now."
|
||||||
|
mkdir -p "/data/$config_folder"
|
||||||
|
fi
|
||||||
|
log "Restoring $journey_map_folder to /data/$config_folder"
|
||||||
|
cp -r "$backup_folder/$journey_map_folder" "/data/$config_folder/"
|
||||||
else
|
else
|
||||||
logWarning "$journey_map_folder not found in backup!"
|
logWarning "$journey_map_folder not found in backup!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy the changelog file to /data
|
# Copy the changelog file to /data
|
||||||
|
local gtnh_changelog_file=""
|
||||||
gtnh_changelog_file=$(mc-image-helper find --max-depth=1 --type=file --name=changelog*.md "$base_dir")
|
gtnh_changelog_file=$(mc-image-helper find --max-depth=1 --type=file --name=changelog*.md "$base_dir")
|
||||||
if [[ -n "$gtnh_changelog_file" ]]; then
|
if [[ -n "$gtnh_changelog_file" ]]; then
|
||||||
|
debug "Found changelog file: $gtnh_changelog_file"
|
||||||
log "Copying changelog file to /data"
|
log "Copying changelog file to /data"
|
||||||
cp -f "$gtnh_changelog_file" /data/
|
cp -f "$gtnh_changelog_file" /data/
|
||||||
fi
|
fi
|
||||||
@@ -154,55 +265,32 @@ function handleGTNH() {
|
|||||||
: "${GTNH_PACK_VERSION:=latest}"
|
: "${GTNH_PACK_VERSION:=latest}"
|
||||||
: "${GTNH_DELETE_BACKUPS:=false}"
|
: "${GTNH_DELETE_BACKUPS:=false}"
|
||||||
: "${SKIP_GTNH_UPDATE_CHECK:=false}"
|
: "${SKIP_GTNH_UPDATE_CHECK:=false}"
|
||||||
debug "GTNH VAR CHECK: GTNH_DELETE_BACKUPS=$GTNH_DELETE_BACKUPS, GTNH_PACK_VERSION=$GTNH_PACK_VERSION, TYPE=$TYPE, SKIP_GTNH_UPDATE_CHECK=$SKIP_GTNH_UPDATE_CHECK"
|
: "${GTNH_USE_DAILY_BUILD:=false}"
|
||||||
|
|
||||||
|
debug "GTNH VAR CHECK: GTNH_DELETE_BACKUPS=$GTNH_DELETE_BACKUPS, GTNH_PACK_VERSION=$GTNH_PACK_VERSION, TYPE=$TYPE, SKIP_GTNH_UPDATE_CHECK=$SKIP_GTNH_UPDATE_CHECK, GTNH_USE_DAILY_BUILD=$GTNH_USE_DAILY_BUILD"
|
||||||
|
|
||||||
if isTrue "$GTNH_DELETE_BACKUPS"; then
|
if isTrue "$GTNH_DELETE_BACKUPS"; then
|
||||||
deleteGTNHbackup
|
deleteGTNHbackup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $GTNH_PACK_VERSION ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK" ; then
|
if [[ -n "$GTNH_PACK_VERSION" ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK"; then
|
||||||
|
|
||||||
getGTNHdownloadPath
|
if isFalse "$GTNH_USE_DAILY_BUILD"; then
|
||||||
|
getGTNHdownloadPath
|
||||||
if [[ -z $gtnh_download_path ]]; then
|
log "Server files located! Will proceed update $gtnh_download_path."
|
||||||
logError "Server files not found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION! Download not possible!"
|
else
|
||||||
exit 1
|
getGTNHdownloadOptions
|
||||||
|
log "Will proceed update with daily build options: ${gtnh_download_options[*]}."
|
||||||
fi
|
fi
|
||||||
log "Server files located! Will proceed update $gtnh_download_path."
|
|
||||||
|
|
||||||
# Decide if update or install is needed or not.
|
# Decide if update or install is needed or not.
|
||||||
if [[ ! -f /data/.gtnh-version || "$(basename "$gtnh_download_path")" != "$(cat /data/.gtnh-version)" ]]; then
|
if [[ ! -f /data/.gtnh-version || "$(basename "$gtnh_download_path")" != "$(cat /data/.gtnh-version)" ]]; then
|
||||||
log "Update/Install required: /data/.gtnh-version is missing or does not match the selected version $(basename "$gtnh_download_path")."
|
log "Update/Install required: /data/.gtnh-version is missing or does not match the selected version $(basename "$gtnh_download_path")."
|
||||||
|
|
||||||
mkdir -p /data/packs
|
# Download and unpack GTNH server files
|
||||||
log "Downloading $gtnh_download_path."
|
downloadGTNH
|
||||||
if ! gtnh_download=$(mc-image-helper get -o /data/packs --output-filename --skip-up-to-date "$gtnh_download_path"); then
|
log "GTNH server files downloaded and unpacked to $base_dir."
|
||||||
logError "Failed to download $gtnh_download_path"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Unpacking Server files into temporary directory
|
|
||||||
log "Unpacking Server Files..."
|
|
||||||
original_base_dir=/data/.tmp/gtnh_base
|
|
||||||
base_dir=$original_base_dir
|
|
||||||
rm -rf "${base_dir}"
|
|
||||||
mkdir -p "${base_dir}"
|
|
||||||
extract "${gtnh_download}" "${base_dir}"
|
|
||||||
trap 'rm -rf /data/.tmp' EXIT
|
|
||||||
# Removing downloaded zip
|
|
||||||
rm -f "$gtnh_download"
|
|
||||||
|
|
||||||
# Remove any eula file since container manages it
|
|
||||||
rm -f "${base_dir}/eula.txt"
|
|
||||||
|
|
||||||
# recalculate the actual base directory of content
|
|
||||||
if ! base_dir=$(mc-image-helper find \
|
|
||||||
--max-depth=3 --type=directory --name=mods,config \
|
|
||||||
--only-shallowest --fail-no-matches --format '%h' \
|
|
||||||
"$base_dir"); then
|
|
||||||
logError "Unable to find content base of downloaded Server Files"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Split installation from update path. Check for version file.
|
# Split installation from update path. Check for version file.
|
||||||
if [[ -f /data/.gtnh-version ]]; then
|
if [[ -f /data/.gtnh-version ]]; then
|
||||||
@@ -212,10 +300,12 @@ function handleGTNH() {
|
|||||||
log "No .gtnh-version file detected! Assuming no old server exists. Proceed installing new server..."
|
log "No .gtnh-version file detected! Assuming no old server exists. Proceed installing new server..."
|
||||||
cp -R -f "${base_dir}"/* /data
|
cp -R -f "${base_dir}"/* /data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update .gtnh-version
|
# Update .gtnh-version
|
||||||
basename "$gtnh_download_path" > /data/.gtnh-version
|
basename "$gtnh_download" > /data/.gtnh-version
|
||||||
# Cleaning up
|
|
||||||
rm -rf "$original_base_dir"
|
# Cleaning up temporary files
|
||||||
|
rm -rf /data/.tmp
|
||||||
|
|
||||||
else
|
else
|
||||||
log "No update required: /data/.gtnh-version matches the selected version $(basename "$gtnh_download_path")."
|
log "No update required: /data/.gtnh-version matches the selected version $(basename "$gtnh_download_path")."
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ elif [[ $PAPER_DOWNLOAD_URL ]]; then
|
|||||||
--url="$PAPER_DOWNLOAD_URL"
|
--url="$PAPER_DOWNLOAD_URL"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $CLEAN_SERVER_LIBRARIES ]]; then
|
if isTrue $CLEAN_SERVER_LIBRARIES; then
|
||||||
args+=(--clean-libraries)
|
args+=(--clean-libraries)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ else
|
|||||||
args+=(--build="$PAPER_BUILD")
|
args+=(--build="$PAPER_BUILD")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $CLEAN_SERVER_LIBRARIES ]]; then
|
if isTrue $CLEAN_SERVER_LIBRARIES; then
|
||||||
args+=(--clean-libraries)
|
args+=(--clean-libraries)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ IFS=$'\n\t'
|
|||||||
: "${PURPUR_BUILD:=LATEST}"
|
: "${PURPUR_BUILD:=LATEST}"
|
||||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||||
: "${PURPUR_CONFIG_REPO:=}"
|
: "${PURPUR_CONFIG_REPO:=}"
|
||||||
|
: "${CLEAN_SERVER_LIBRARIES:=true}"
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
# shellcheck source=start-utils
|
||||||
. "$(dirname "$0")/start-utils"
|
. "$(dirname "$0")/start-utils"
|
||||||
@@ -13,10 +14,15 @@ isDebugging && set -x
|
|||||||
resultsFile=/data/.purpur.env
|
resultsFile=/data/.purpur.env
|
||||||
|
|
||||||
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
||||||
if ! mc-image-helper install-purpur \
|
args=(
|
||||||
--output-directory=/data \
|
--output-directory=/data
|
||||||
--results-file="$resultsFile" \
|
--results-file="$resultsFile"
|
||||||
--url="${PURPUR_DOWNLOAD_URL}"; then
|
--url="${PURPUR_DOWNLOAD_URL}"
|
||||||
|
)
|
||||||
|
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||||
|
args+=(--clean-libraries)
|
||||||
|
fi
|
||||||
|
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||||
logError "Failed to download from custom Purpur URL"
|
logError "Failed to download from custom Purpur URL"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -29,6 +35,9 @@ else
|
|||||||
if [[ $PURPUR_BUILD ]]; then
|
if [[ $PURPUR_BUILD ]]; then
|
||||||
args+=(--build="$PURPUR_BUILD")
|
args+=(--build="$PURPUR_BUILD")
|
||||||
fi
|
fi
|
||||||
|
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||||
|
args+=(--clean-libraries)
|
||||||
|
fi
|
||||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||||
logError "Failed to download Purpur"
|
logError "Failed to download Purpur"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
+16
-40
@@ -5,52 +5,28 @@
|
|||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
resolveVersion
|
resultsFile=/data/.install-vanilla.env
|
||||||
export SERVER="minecraft_server.${VERSION// /_}.jar"
|
|
||||||
|
|
||||||
if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
args=(
|
||||||
debug "Finding version manifest for $VERSION"
|
--output-directory=/data
|
||||||
versionManifestUrl=$(get 'https://launchermeta.mojang.com/mc/game/version_manifest.json' | jq --arg VERSION "$VERSION" --raw-output '[.versions[]|select(.id == $VERSION)][0].url')
|
--results-file="${resultsFile}"
|
||||||
result=$?
|
--version="${VERSION}"
|
||||||
if [ $result != 0 ]; then
|
)
|
||||||
logError "Failed to obtain version manifest URL ($result)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$versionManifestUrl" = "null" ]; then
|
|
||||||
logError "Couldn't find a matching manifest entry for $VERSION"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
debug "Found version manifest at $versionManifestUrl"
|
|
||||||
|
|
||||||
if ! serverDownloadUrl=$(get --json-path '$.downloads.server.url' "${versionManifestUrl}"); then
|
if isTrue "${FORCE_REDOWNLOAD}"; then
|
||||||
logError "Failed to obtain version manifest from $versionManifestUrl ($result)"
|
log "Forcing re-install of Minecraft"
|
||||||
exit 1
|
args+=(--force-reinstall)
|
||||||
elif [ "$serverDownloadUrl" = "null" ]; then
|
|
||||||
logError "There is not a server download for version $VERSION"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "Downloading $VERSION server..."
|
|
||||||
debug "Downloading server from $serverDownloadUrl"
|
|
||||||
get -o "$SERVER" "$serverDownloadUrl"
|
|
||||||
result=$?
|
|
||||||
if [ $result != 0 ]; then
|
|
||||||
logError "Failed to download server from $serverDownloadUrl ($result)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
minecraftServerJarPath=/data/minecraft_server.jar
|
|
||||||
|
|
||||||
if versionLessThan 1.6; then
|
if ! mc-image-helper install-vanilla "${args[@]}"; then
|
||||||
if ! [[ -L $minecraftServerJarPath && $minecraftServerJarPath -ef "/data/$SERVER" ]]; then
|
logError "Failed to install vanilla Minecraft version $VERSION"
|
||||||
rm -f $minecraftServerJarPath
|
exit 1
|
||||||
ln -s "/data/$SERVER" $minecraftServerJarPath
|
|
||||||
fi
|
|
||||||
SERVER=minecraft_server.jar
|
|
||||||
elif [[ -L $minecraftServerJarPath ]]; then
|
|
||||||
rm -f $minecraftServerJarPath
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
applyResultsFile "${resultsFile}"
|
||||||
|
|
||||||
|
log "Successfully setup vanilla Minecraft version $VERSION"
|
||||||
|
|
||||||
isDebugging && ls -l
|
isDebugging && ls -l
|
||||||
export FAMILY=VANILLA
|
export FAMILY=VANILLA
|
||||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
: "${DEBUG_EXEC:=false}"
|
: "${DEBUG_EXEC:=false}"
|
||||||
: "${SETUP_ONLY:=false}"
|
: "${SETUP_ONLY:=false}"
|
||||||
: "${CUSTOM_JAR_EXEC:=}"
|
: "${CUSTOM_JAR_EXEC:=}"
|
||||||
|
: "${SERVER_RUNNER:=mc-server-runner}"
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
# shellcheck source=start-utils
|
||||||
. "$(dirname "$0")/start-utils"
|
. "$(dirname "$0")/start-utils"
|
||||||
@@ -96,7 +97,7 @@ fi
|
|||||||
if versionLessThan 1.7; then
|
if versionLessThan 1.7; then
|
||||||
: # No patch required here.
|
: # No patch required here.
|
||||||
elif versionLessThan 1.18.1; then
|
elif versionLessThan 1.18.1; then
|
||||||
if isTrue ${SKIP_LOG4J_PATCHER:-false}; then
|
if isTrue "${SKIP_LOG4J_PATCHER:-false}"; then
|
||||||
log "Skipping Log4jPatcher, make sure you are not affected"
|
log "Skipping Log4jPatcher, make sure you are not affected"
|
||||||
else
|
else
|
||||||
JVM_OPTS="-javaagent:/image/Log4jPatcher.jar ${JVM_OPTS}"
|
JVM_OPTS="-javaagent:/image/Log4jPatcher.jar ${JVM_OPTS}"
|
||||||
@@ -496,7 +497,7 @@ if [[ ${TYPE} == "CURSEFORGE" && "${SERVER}" ]]; then
|
|||||||
if isTrue "${DEBUG_EXEC}"; then
|
if isTrue "${DEBUG_EXEC}"; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar "$(basename "${SERVER}")" "$@" $EXTRA_ARGS
|
exec ${SERVER_RUNNER} ${bootstrapArgs} "${mcServerRunnerArgs[@]}" -- java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar "$(basename "${SERVER}")" "$@" $EXTRA_ARGS
|
||||||
elif [[ ${TYPE} == "CURSEFORGE" ]]; then
|
elif [[ ${TYPE} == "CURSEFORGE" ]]; then
|
||||||
mcServerRunnerArgs+=(--shell bash)
|
mcServerRunnerArgs+=(--shell bash)
|
||||||
|
|
||||||
@@ -550,18 +551,18 @@ 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
|
||||||
exec mc-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..."
|
||||||
echo $JVM_XX_OPTS $JVM_OPTS $expandedDOpts > user_jvm_args.txt
|
echo $JVM_XX_OPTS $JVM_OPTS $expandedDOpts > user_jvm_args.txt
|
||||||
if isTrue ${SETUP_ONLY}; then
|
if isTrue "${SETUP_ONLY}"; then
|
||||||
echo "SETUP_ONLY: bash ${SERVER}"
|
echo "SETUP_ONLY: bash ${SERVER}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if isTrue "${DEBUG_EXEC}"; then
|
if isTrue "${DEBUG_EXEC}"; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" --shell bash "${SERVER}" $EXTRA_ARGS
|
exec ${SERVER_RUNNER} "${mcServerRunnerArgs[@]}" --shell bash -- "${SERVER}" $EXTRA_ARGS
|
||||||
else
|
else
|
||||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||||
if [ -f $bootstrapPath ]; then
|
if [ -f $bootstrapPath ]; then
|
||||||
@@ -590,7 +591,7 @@ else
|
|||||||
"$@" $EXTRA_ARGS
|
"$@" $EXTRA_ARGS
|
||||||
)
|
)
|
||||||
|
|
||||||
if isTrue ${SETUP_ONLY}; then
|
if isTrue "${SETUP_ONLY}"; then
|
||||||
echo "SETUP_ONLY: java ${finalArgs[*]}"
|
echo "SETUP_ONLY: java ${finalArgs[*]}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@@ -599,5 +600,5 @@ else
|
|||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java "${finalArgs[@]}"
|
exec ${SERVER_RUNNER} ${bootstrapArgs} "${mcServerRunnerArgs[@]}" -- java "${finalArgs[@]}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ set -e -o pipefail
|
|||||||
: "${REMOVE_OLD_MODS_DEPTH:=1} "
|
: "${REMOVE_OLD_MODS_DEPTH:=1} "
|
||||||
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
|
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
|
||||||
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
||||||
|
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
|
||||||
: "${MODRINTH_LOADER:=}"
|
: "${MODRINTH_LOADER:=}"
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
# shellcheck source=start-utils
|
||||||
@@ -50,6 +51,16 @@ function handlePackwiz() {
|
|||||||
logError "Failed to run packwiz installer"
|
logError "Failed to run packwiz installer"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# packwiz may have just downloaded/updated the env file referenced by
|
||||||
|
# LOAD_ENV_FROM_FILE. The initial load in start-configuration happened
|
||||||
|
# before this point, so re-load it now to pick up the pack's values for
|
||||||
|
# the remaining setup stages (server.properties, JVM args, etc.).
|
||||||
|
if [[ ${LOAD_ENV_FROM_FILE:-} ]]; then
|
||||||
|
if ! loadEnvFromFile "${LOAD_ENV_FROM_FILE}"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +181,38 @@ function handleGenericPacks() {
|
|||||||
packFiles=()
|
packFiles=()
|
||||||
for packEntry in "${packs[@]}"; do
|
for packEntry in "${packs[@]}"; do
|
||||||
pack="${GENERIC_PACKS_PREFIX}${packEntry}${GENERIC_PACKS_SUFFIX}"
|
pack="${GENERIC_PACKS_PREFIX}${packEntry}${GENERIC_PACKS_SUFFIX}"
|
||||||
if isURL "${pack}"; then
|
if isOCIRef "${pack}"; then
|
||||||
|
# All OCI refs share one staging dir so layers common to multiple
|
||||||
|
# sibling artifacts (the point of layered distribution) are pulled
|
||||||
|
# exactly once across all of GENERIC_PACKS.
|
||||||
|
mkdir -p /data/packs/oci /data/.tmp
|
||||||
|
log "Pulling OCI generic pack from $pack"
|
||||||
|
# A list file is used rather than stdout because mc-image-helper INFO
|
||||||
|
# logs share that stream; it holds one absolute layer path per line in
|
||||||
|
# apply order.
|
||||||
|
layerListFile=$(mktemp -p /data/.tmp)
|
||||||
|
ociArgs=(install-oci-pack
|
||||||
|
--ref "$pack"
|
||||||
|
--output-directory /data/packs/oci
|
||||||
|
--filename-strategy digest
|
||||||
|
--layer-list-file "$layerListFile")
|
||||||
|
if [[ "${GENERIC_PACKS_OCI_AUTH_FILE:-}" ]]; then
|
||||||
|
ociArgs+=(--auth-file "${GENERIC_PACKS_OCI_AUTH_FILE}")
|
||||||
|
fi
|
||||||
|
if ! mc-image-helper "${ociArgs[@]}"; then
|
||||||
|
logError "Failed to pull OCI generic pack $pack"
|
||||||
|
logError "(OCI generic packs require mc-image-helper with install-oci-pack support)"
|
||||||
|
rm -f "$layerListFile"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
mapfile -t ociLayers < "$layerListFile"
|
||||||
|
rm -f "$layerListFile"
|
||||||
|
if [ ${#ociLayers[@]} -eq 0 ]; then
|
||||||
|
logError "OCI generic pack $pack resolved to zero layers"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
packFiles+=("${ociLayers[@]}")
|
||||||
|
elif isURL "${pack}"; then
|
||||||
mkdir -p /data/packs
|
mkdir -p /data/packs
|
||||||
log "Downloading generic pack from $pack"
|
log "Downloading generic pack from $pack"
|
||||||
if ! outfile=$(get -o /data/packs --output-filename --skip-up-to-date "$pack"); then
|
if ! outfile=$(get -o /data/packs --output-filename --skip-up-to-date "$pack"); then
|
||||||
@@ -286,7 +328,9 @@ function handleModrinthProjects() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCurseForgeFiles() {
|
function handleCurseForgeFiles() {
|
||||||
args=()
|
args=(
|
||||||
|
--use-http2="$CF_USE_HTTP2"
|
||||||
|
)
|
||||||
if usesMods && ! usesPlugins; then
|
if usesMods && ! usesPlugins; then
|
||||||
args+=(--default-category mc-mods)
|
args+=(--default-category mc-mods)
|
||||||
elif usesPlugins && ! usesMods; then
|
elif usesPlugins && ! usesMods; then
|
||||||
|
|||||||
@@ -173,6 +173,12 @@ function isURL() {
|
|||||||
[[ $value =~ ^(https?|ftp):// ]]
|
[[ $value =~ ^(https?|ftp):// ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isOCIRef() {
|
||||||
|
local value=$1
|
||||||
|
|
||||||
|
[[ $value =~ ^oci:// ]]
|
||||||
|
}
|
||||||
|
|
||||||
function isValidFileURL() {
|
function isValidFileURL() {
|
||||||
suffix=${1:?Missing required suffix arg}
|
suffix=${1:?Missing required suffix arg}
|
||||||
url=${2:?Missing required url arg}
|
url=${2:?Missing required url arg}
|
||||||
@@ -560,6 +566,17 @@ function extract() {
|
|||||||
# remaining args are paths within the archive to extract; if none, extract everything
|
# remaining args are paths within the archive to extract; if none, extract everything
|
||||||
|
|
||||||
type=$(file -b --mime-type "${src}")
|
type=$(file -b --mime-type "${src}")
|
||||||
|
if [[ "$type" == application/octet-stream ]]; then
|
||||||
|
logWarning "Detected non-specific file type $type for $src"
|
||||||
|
case "$src" in
|
||||||
|
*.zip)
|
||||||
|
log "Assuming zip from extension"
|
||||||
|
type=application/zip
|
||||||
|
;;
|
||||||
|
# otherwise fall through to
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
case "${type}" in
|
case "${type}" in
|
||||||
application/zip)
|
application/zip)
|
||||||
unzip -o -q -d "${destDir}" "${src}" "$@"
|
unzip -o -q -d "${destDir}" "${src}" "$@"
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
SETUP_ONLY: "true"
|
||||||
|
# two OCI packs that share a common base layer; the shared blob is
|
||||||
|
# pulled into /data/packs/oci once and reused for the second pack
|
||||||
|
GENERIC_PACKS: oci://ghcr.io/itzg/oci-modpack-template/tech:latest,oci://ghcr.io/itzg/oci-modpack-template/magic:latest
|
||||||
|
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
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[[ $EXTENDED_TESTS ]] || exit 1
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
set -e
|
||||||
|
# OCI layers were cached
|
||||||
|
[ -d /data/packs/oci ]
|
||||||
|
compgen -G "/data/packs/oci/sha256:*" > /dev/null
|
||||||
|
# pack content was extracted and applied to /data
|
||||||
|
[ -d /data/mods ]
|
||||||
|
compgen -G "/data/mods/*" > /dev/null
|
||||||
@@ -46,7 +46,7 @@ setupOnlyMinecraftTest(){
|
|||||||
start=$(date +%s)
|
start=$(date +%s)
|
||||||
status=PASSED
|
status=PASSED
|
||||||
verify=
|
verify=
|
||||||
if ! logs=$(docker compose run --rm -e SETUP_ONLY=true -e DEBUG="${DEBUG:-false}" mc 2>&1); then
|
if ! logs=$(docker compose run --rm -e SETUP_ONLY=true -e DEBUG="${DEBUG:-false}" -e GH_TOKEN="${GH_TOKEN:-}" mc 2>&1); then
|
||||||
status=FAILED
|
status=FAILED
|
||||||
outputContainerLog "$logs"
|
outputContainerLog "$logs"
|
||||||
result=1
|
result=1
|
||||||
|
|||||||
Reference in New Issue
Block a user