Compare commits

..

106 Commits

Author SHA1 Message Date
Geoff Bourne
33435b7e52 Generalize EULA instructions in error 2025-03-21 16:06:05 -05:00
Geoff Bourne
231ac0f665 Add Docker logo to badges (#3375) 2025-03-19 20:52:46 -05:00
Geoff Bourne
68a56be107 Fix SKIP_CHOWN_DATA (#3374) 2025-03-19 19:43:26 -05:00
dependabot[bot]
ac32c8706f build(deps): bump the updates group across 1 directory with 5 updates (#3369) 2025-03-17 20:27:49 -05:00
Geoff Bourne
f5e511e3cc docs: clarify that ICON can be a container path (#3371) 2025-03-17 09:41:21 -05:00
dependabot[bot]
2a859d61f6 build(deps): bump mkdocs-material from 9.6.7 to 9.6.8 in /docs in the patches group (#3370) 2025-03-17 07:36:02 -05:00
dependabot[bot]
943429e180 build(deps): bump the patches group across 1 directory with 3 updates (#3355)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
2025-03-16 14:23:03 -05:00
Geoff Bourne
7e5f5805a5 Add AUTOPAUSE_STATUS_RETRY_LIMIT and AUTOPAUSE_STATUS_RETRY_INTERVAL (#3365) 2025-03-16 13:25:37 -05:00
joesturge
777f4e26b9 Lazymc - Update misc examples with non-deprecated method of managing lazymc (#3360) 2025-03-15 18:44:23 -05:00
Henry
21f2a7e86c Exclude compass-coords globally from cf and mr, client side mod (#3361) 2025-03-15 10:07:12 -05:00
Geoff Bourne
f22d291bfc rcon-cli upgraded to support command history (#3354) 2025-03-08 18:20:28 -06:00
Geoff Bourne
5fd2522028 examples: moved fabric into its own directory (#3353) 2025-03-08 18:14:54 -06:00
EmilyxFox
a7b35d955b add sound to excluded mods as it crashes server on load. (#3350) 2025-03-06 07:26:02 -06:00
litetex
73e402b46d Fix log4j2 warning / Remove package scanning (#3347) 2025-03-03 12:44:55 -06:00
Greg
73cb6333b7 Update auto-curseforge docs wording around version pinning. (#3344) 2025-02-27 07:55:35 -06:00
Geoff Bourne
6f190a68a2 Upgrade helper to 1.41.2 (#3343) 2025-02-26 09:10:36 -06:00
Geoff Bourne
4eedde802b Add specific file version header for auto-curseforge (#3342) 2025-02-26 07:15:38 -06:00
dependabot[bot]
8bb7ea9000 build(deps): bump docker/build-push-action from 6.13.0 to 6.14.0 in the updates group (#3337)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-25 12:59:30 -06:00
jackguy80
fcfb1cd74c 1863: use SLP for pre-1.7 servers. (#3336) 2025-02-24 07:45:46 -06:00
Geoff Bourne
beb3b4a2ce fabric: skip web API access when all versions match installed (#3332) 2025-02-22 14:57:57 -06:00
Geoff Bourne
dcdbb85936 Added USES_PLUGINS to allows /plugins use with hybrid mods (#3320) 2025-02-17 11:11:53 -06:00
Geoff Bourne
3a678a6bf3 Clarify CF_API_KEY setup in examples (#3321) 2025-02-16 13:19:16 -06:00
Thomas Violent
b1128db9cc Add sound-reload to cf-exclude-include.json (#3317) 2025-02-16 13:03:54 -06:00
nils_kiefer
b32666183a Added fabric-server-launch.jar to variants FTBA (#3314) 2025-02-15 20:42:49 -06:00
Geoff Bourne
dcf4ae89fb build: upgrade tools to Go 1.23.6 (#3305) 2025-02-11 07:05:18 -07:00
dependabot[bot]
066116fd35 build(deps): bump the updates group with 2 updates (#3304) 2025-02-10 06:21:24 -07:00
Geoff Bourne
7404122956 build: add Java 23 variants (#3297) 2025-02-09 14:53:02 -06:00
EmilyxFox
78217928c1 Remove konkrete from cf-exclude-include (#3300) 2025-02-09 12:22:03 -07:00
dependabot[bot]
b74de64009 build(deps): bump mkdocs-material from 9.5.50 to 9.6.1 in /docs in the patches group (#3293) 2025-02-03 06:25:18 -07:00
Geoff Bourne
1fb7e50c0d deps: upgrade Go-based tools to resolve vulnerabilities (#3292) 2025-02-02 16:50:16 -07:00
August Abt
5742a34658 Ensure legacy whitelist overrides work like ops overrides (#3289) 2025-02-02 14:48:41 -06:00
Geoff Bourne
7cdb7d398c Add support for Cleanroom (Forge fork) installer (#3291) 2025-02-02 14:47:03 -06:00
dependabot[bot]
26d97c21cc build(deps): bump docker/build-push-action from 6.12.0 to 6.13.0 in the updates group (#3283) 2025-01-28 06:08:21 -07:00
Caden Kriese
40daa8b803 Clarify Vanilla Tweaks file documentation (#3287) 2025-01-27 20:52:24 -07:00
dependabot[bot]
dff4673094 build(deps): bump mkdocs-static-i18n from 1.2.3 to 1.3.0 in /docs in the patches group (#3284) 2025-01-27 07:55:09 -07:00
Azuna
6bb2c3a8c4 Feat: Disabling Mods in Generic Packs (#3281) 2025-01-26 19:50:59 -07:00
DerRockWolf
0ff1e993d0 Provide ability to skip STOP_SERVER_ANNOUNCE_DELAY on demand (#3280) 2025-01-25 15:42:47 -07:00
Niklas Gerstner
319315a001 Add configurator tool to documentation (#3272) 2025-01-22 09:43:25 -06:00
Fernando Rodriguez
6c10f265c8 Bump mc-monitor to fix cve (#3270) 2025-01-20 13:31:32 -06:00
dependabot[bot]
0e3f75879d build(deps): bump docker/build-push-action from 6.11.0 to 6.12.0 in the updates group (#3268) 2025-01-20 08:18:39 -06:00
dependabot[bot]
b595c107bb build(deps): bump mkdocs-material from 9.5.49 to 9.5.50 in /docs in the patches group (#3267) 2025-01-20 08:04:29 -06:00
Geoff Bourne
3613a30709 Clarify java edition aspect (#3264) 2025-01-19 12:55:48 -06:00
Tert0
da1b052516 datapack: allow copying from directory (#3259) 2025-01-19 08:25:33 -06:00
Liz Fransen
abb3af07ba Version bump GTNH to 2.7.2 (#3258) 2025-01-17 14:08:54 -06:00
Geoff Bourne
4f1a09b2a9 examples: adjust gtnh example to use MEMORY and JVM_OPTS (#3257) 2025-01-16 10:30:13 -06:00
Geoff Bourne
4e63990bd7 cf: handle spaces around commas for includes/excludes (#3256) 2025-01-16 09:34:34 -06:00
Geoff Bourne
883d64159f cf: qualify mapping of excluded slug to mod IDs (#3254) 2025-01-14 20:55:59 -06:00
dependabot[bot]
d35b78c14e build(deps): bump mkdocs-autorefs from 1.2.0 to 1.3.0 in /docs in the patches group (#3250) 2025-01-13 07:56:22 -06:00
dependabot[bot]
d420c523a3 build(deps): bump the updates group with 2 updates (#3249) 2025-01-13 07:23:05 -06:00
Wavering Ana
1e28390d1b update mohist download script to use new API endpoint (#3247) 2025-01-12 08:11:38 -06:00
Geoff Bourne
f79ef8f3a7 ketting: fixed launcher invocation (#3244) 2025-01-10 14:52:19 -06:00
Geoff Bourne
a485f84797 modrinth: added excludes needed for create_plus (#3242) 2025-01-08 20:52:28 -06:00
Leon Kampwerth
51ba6a2c71 Fixed compose error due to missing key in GTNH example (#3238) 2025-01-06 14:15:28 -06:00
Geoff Bourne
e5b7a5829f cf: gracefully handle invalid modpack manifest file (#3237) 2025-01-06 11:05:29 -06:00
Geoff Bourne
6a994acc52 Added example for skyfactory5 (#3235) 2025-01-06 08:36:30 -06:00
Geoff Bourne
f46298c6b8 Added compose example snippets for Paper docs (#3231) 2025-01-04 11:57:04 -06:00
Geoff Bourne
a72fb19ec6 Install tput for colorized logs on alpine images (#3229) 2025-01-03 19:09:52 -06:00
Geoff Bourne
4914ffbe40 neoforge: grab latest beta even when non-beta release is newer (#3227) 2025-01-03 17:09:19 -06:00
Geoff Bourne
03f9037668 Corrected calculation of Canyon download URL (#3226) 2025-01-03 17:01:32 -06:00
Niklas Gerstner
621bafb4f2 Download paper.yml and bukkit.yml (#3217) 2024-12-31 08:46:33 -06:00
Geoff Bourne
9a20ab7b48 Download default spigot.yml for PaperMC to top-level directory (#3216) 2024-12-30 19:02:43 -06:00
Geoff Bourne
6514ed85a0 Cache CF search API calls and better handle CURSEFORGE_FILES rate limit (#3215) 2024-12-29 13:57:36 -06:00
EmilyxFox
6391be5251 added cf new exclusions (#3214) 2024-12-29 08:35:44 -06:00
Prabhjot
2d1a35dba8 fix vault hunters example (#3213) 2024-12-28 17:20:56 -06:00
Liz Fransen
236ed74295 Add an Example of Setting Up GregTech: New Horizons (#3212) 2024-12-27 11:42:24 -06:00
dependabot[bot]
05cbbfc9e3 build(deps): bump docker/setup-buildx-action from 3.7.1 to 3.8.0 in the updates group (#3202) 2024-12-24 16:18:07 -06:00
Geoff Bourne
678dda5d4a docs: clarify curseforge listing file and GetBukkit limitation (#3205) 2024-12-23 14:07:14 -06:00
dependabot[bot]
c3e96f6ac6 build(deps): bump mkdocs-material from 9.5.48 to 9.5.49 in /docs in the patches group (#3203)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 09:05:47 -06:00
Jordi
1f6288efd8 Add example of Craftoria modpack (#3198) 2024-12-17 18:51:23 -06:00
M
787a31a5f1 Clarify Modrinth URL structure in documentation (#3197) 2024-12-17 13:03:11 -06:00
Geoff Bourne
66a6df4029 docs: clarified Modrinth support includes plugins and datapacks (#3196) 2024-12-17 12:42:30 -06:00
Sculas
de19794a5f fix: install missing language pack for GraalVM (#3189) 2024-12-14 15:22:08 -06:00
Geoff Bourne
0582a8ab97 Corrected examples link in autopause docs (#3188) 2024-12-11 07:09:06 -06:00
Geoff Bourne
94def951b6 Make sure download new version of FTB installer (#3186) 2024-12-09 20:03:19 -06:00
dependabot[bot]
755f1c5352 build(deps): bump mkdocs-material from 9.5.47 to 9.5.48 in /docs in the patches group (#3184) 2024-12-09 06:57:10 -06:00
Juan jose Del Porto Bayut
4804c4bb67 Added xaeroplus and yungs-menu-tweaks to the exclude list (#3181) 2024-12-07 09:29:14 -06:00
Geoff Bourne
58302f9490 Fix syntax error in start-deployPurpur (#3178) 2024-12-06 09:53:47 -06:00
Geoff Bourne
c6dbc88ea9 Re-install FTB if manifest is missing (#3177) 2024-12-05 07:40:50 -06:00
Geoff Bourne
a31440476c Fixed new FTB installer args and manifest (#3176) 2024-12-04 07:20:10 -06:00
Geoff Bourne
350bada3a8 Switch FTBA to use https://api.feed-the-beast.com/v1 (#3174) 2024-12-03 21:25:44 -06:00
d3n1z6
86354f5ec2 fix ngrok docker compose example (#3173) 2024-12-03 11:31:36 -06:00
dependabot[bot]
f1d0736689 build(deps): bump mkdocs-material from 9.5.45 to 9.5.47 in /docs in the patches group (#3172) 2024-12-03 07:49:26 -06:00
dependabot[bot]
e2015afdb4 build(deps): bump docker/build-push-action from 6.9.0 to 6.10.0 in the updates group (#3171) 2024-12-02 09:26:55 -06:00
Geoff Bourne
4555cf433e cf: use fallback URL for curseforge files like modpack files (#3158) 2024-11-29 14:29:02 -06:00
EmilyxFox
e090b0aef5 add advancement plaques to cf exclusions (#3168) 2024-11-29 12:39:27 -06:00
Geoff Bourne
a03d02e59e Correcting name of .mc-health.env file (#3167) 2024-11-28 15:26:47 -06:00
Geoff Bourne
21ad4146aa docs: adjust memory and volume in atm10 example (#3166) 2024-11-28 12:36:12 -06:00
Geoff Bourne
6fd275cdc6 cf: added default excludes needed for ATM10 (#3164) 2024-11-26 16:27:55 -06:00
dependabot[bot]
954bb887d3 build(deps): bump docker/metadata-action from 5.5.1 to 5.6.1 in the updates group (#3162) 2024-11-25 10:30:13 -06:00
dependabot[bot]
ec8e689132 build(deps): bump mkdocs-material from 9.5.44 to 9.5.45 in /docs in the patches group (#3161) 2024-11-25 08:00:57 -06:00
Geoff Bourne
039b90839b Include processing of SPIGET_RESOURCES with TYPE=CUSTOM (#3156) 2024-11-21 21:49:22 -06:00
Geoff Bourne
bfc75cad21 deps: upgrade mc-monitor to 0.15.0 (#3149) 2024-11-11 10:11:14 -06:00
dependabot[bot]
f178b99459 build(deps): bump the patches group in /docs with 2 updates (#3147) 2024-11-11 08:24:40 -06:00
Geoff Bourne
2680e02b34 modrinth: more info in error when dependency has no applicable files (#3142) 2024-11-09 12:46:12 -06:00
Ryan Hullah
14f96d11e5 Create ATM10 example (#3143) 2024-11-09 08:51:59 -06:00
Geoff Bourne
b41e63cec5 Correctly handle NeoForge CF modpacks also using CURSEFORGE_FILES (#3139) 2024-11-04 16:00:28 -07:00
dependabot[bot]
1b5c3bd8b9 build(deps): bump mkdocs-material from 9.5.42 to 9.5.43 in /docs in the patches group (#3138) 2024-11-04 08:33:47 -07:00
EmilyxFox
2412f6a740 add ftb-evolution example file (#3135) 2024-11-03 14:16:21 -07:00
dependabot[bot]
d33d1e7f69 build(deps): bump actions/checkout from 4.2.1 to 4.2.2 in the updates group (#3130) 2024-10-28 07:15:56 -05:00
Tristan
868bcb7272 fix start-deployFTBA (#3124) 2024-10-26 08:40:36 -05:00
Geoff Bourne
f872eb55cc Fix incorrect warning about setting TYPE and MODPACK_PLATFORM (#3122) 2024-10-24 15:20:50 -05:00
Tristan
e69ee85f8e #3115 rename MOD_PLATFORM to MODPACK_PLATFORM (#3120) 2024-10-24 07:12:13 -05:00
Tristan
bef7b4719f New logger with color and specific types. Code cleanup (#3108) 2024-10-22 16:04:38 -05:00
dependabot[bot]
a356c6810e build(deps): bump mkdocs-material from 9.5.40 to 9.5.42 in /docs in the patches group (#3119) 2024-10-21 07:15:54 -05:00
dependabot[bot]
f7c1e9d2c1 build(deps): bump SethCohen/github-releases-to-discord from 1.15.1 to 1.16.2 in the updates group (#3118) 2024-10-21 07:01:30 -05:00
João Gabriel Moreira Bossatto Daré
ae69de8ca0 port configuration for local modrinth modpack setup (#3116) 2024-10-20 09:43:28 -05:00
110 changed files with 1233 additions and 686 deletions

View File

@@ -20,10 +20,12 @@ jobs:
matrix:
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
variant:
- java21-graalvm
- java23
- java23-graalvm
- java21
- java21-jdk
- java21-alpine
- java21-graalvm
- java21-jdk
- java17
- java17-graalvm
- java17-alpine
@@ -33,6 +35,15 @@ jobs:
- java8-jdk
- java11
include:
# JAVA 23
- variant: java23
baseImage: eclipse-temurin:23-jre
platforms: linux/amd64,linux/arm64
mcVersion: latest
- variant: java23-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:23-ol8
platforms: linux/amd64,linux/arm64
mcVersion: latest
# JAVA 21:
- variant: java21-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:21-ol8
@@ -93,14 +104,14 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
with:
# for build-files step
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v5.5.1
uses: docker/metadata-action@v5.7.0
with:
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
# then the use of ${{ github.repository_owner }} will need to be replaced.
@@ -128,13 +139,13 @@ jobs:
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
uses: docker/setup-buildx-action@v3.10.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
uses: docker/setup-qemu-action@v3.6.0
- name: Build for test
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.15.0
with:
platforms: linux/amd64
tags: ${{ env.IMAGE_TO_TEST }}
@@ -157,14 +168,14 @@ jobs:
tests/test.sh
- name: Login to DockerHub
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.4.0
if: env.HAS_IMAGE_REPO_ACCESS
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.4.0
if: env.HAS_IMAGE_REPO_ACCESS
with:
registry: ghcr.io
@@ -172,7 +183,7 @@ jobs:
password: ${{ github.token }}
- name: Build and push
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.15.0
if: github.actor == github.repository_owner
with:
platforms: ${{ matrix.platforms }}

View File

@@ -19,7 +19,7 @@ jobs:
steps:
- name: on-publish
if: github.event_name == 'release' && github.event.action == 'published'
uses: SethCohen/github-releases-to-discord@v1.15.1
uses: SethCohen/github-releases-to-discord@v1.16.2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
- name: on-success

View File

@@ -47,16 +47,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
with:
# for build-files step
fetch-depth: 0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
uses: docker/setup-buildx-action@v3.10.0
- name: Confirm multi-arch build
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.15.0
with:
platforms: ${{ matrix.platforms }}
# ensure latest base image is used
@@ -66,7 +66,7 @@ jobs:
cache-from: type=gha,scope=${{ matrix.variant }}
- name: Build for test
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.15.0
with:
# Only build single platform since loading multi-arch image into daemon fails with
# "docker exporter does not currently support exporting manifest lists"

View File

@@ -26,31 +26,31 @@ EXPOSE 25565
ARG APPS_REV=1
ARG GITHUB_BASEURL=https://github.com
ARG EASY_ADD_VERSION=0.8.8
ARG EASY_ADD_VERSION=0.8.9
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
RUN chmod +x /usr/bin/easy-add
ARG RESTIFY_VERSION=1.7.5
ARG RESTIFY_VERSION=1.7.7
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG RCON_CLI_VERSION=1.6.9
ARG RCON_CLI_VERSION=1.7.0
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_MONITOR_VERSION=0.14.1
ARG MC_MONITOR_VERSION=0.15.3
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_SERVER_RUNNER_VERSION=1.12.3
ARG MC_SERVER_RUNNER_VERSION=1.12.6
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.40.2
ARG MC_HELPER_VERSION=1.41.2
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1
@@ -64,7 +64,7 @@ WORKDIR /data
STOPSIGNAL SIGTERM
# End user MUST set EULA and change RCON_PASSWORD
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/

View File

@@ -1,5 +1,5 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/itzg/minecraft-server.svg)](https://hub.docker.com/r/itzg/minecraft-server/)
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?maxAge=2592000)](https://hub.docker.com/r/itzg/minecraft-server/)
[![Docker Pulls](https://img.shields.io/docker/pulls/itzg/minecraft-server.svg?logo=docker)](https://hub.docker.com/r/itzg/minecraft-server/)
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?logo=docker)](https://hub.docker.com/r/itzg/minecraft-server/)
[![GitHub Issues](https://img.shields.io/github/issues-raw/itzg/docker-minecraft-server.svg)](https://github.com/itzg/docker-minecraft-server/issues)
[![Discord](https://img.shields.io/discord/660567679458869252?label=Discord&logo=discord)](https://discord.gg/DXfKpjB)
[![Build and Publish](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml/badge.svg)](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml)
@@ -10,10 +10,12 @@
There you will find things like
- [Quick start with Docker Compose](https://docker-minecraft-server.readthedocs.io/en/latest/#using-docker-compose)
- Running [different versions of Minecraft](https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/) and using [various server types](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
- Running [different versions of Minecraft](https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/) and using [various server types](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/) for Java Edition
- [Setting server properties via container environment variables](https://docker-minecraft-server.readthedocs.io/en/latest/configuration/server-properties/)
- [Managing mods and plugins with automated downloads and cleanup](https://docker-minecraft-server.readthedocs.io/en/latest/mods-and-plugins/)
- [Using various modpack providers/platforms](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
- ...and much more
There are also many examples located in [the examples directory](examples) of this repo.
There are also many examples located in [the examples directory](examples) of this repo.
This image only supports Java edition natively; however, if looking for a server that is compatible with Bedrock edition, then use [itzg/minecraft-bedrock-server](https://github.com/itzg/docker-minecraft-bedrock-server) or [refer to this section](https://docker-minecraft-server.readthedocs.io/en/latest/misc/examples/#bedrock-compatible-server) to add Bedrock compatibility to a Java edition server.

View File

@@ -3,26 +3,22 @@
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
echo "ERROR: console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
error "Console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
fi
if [ $# = 0 ]; then
echo "ERROR: pass console commands as arguments"
error "Pass console commands as arguments"
exit 1
fi
if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
echo "ERROR: named pipe ${CONSOLE_IN_NAMED_PIPE} is missing"
error "Named pipe ${CONSOLE_IN_NAMED_PIPE} is missing"
exit 1
fi
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
if [[ $(getDistro) == alpine ]]; then
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
else
exec gosu minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
fi
exec $(getSudoFromDistro) minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE}'"
else
echo "$@" >"${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
echo "$@" >"${CONSOLE_IN_NAMED_PIPE}"
fi

View File

@@ -1,6 +1,6 @@
#!/bin/bash
echo "WARNING: mcstatus is deprecated; calling mc-monitor instead"
warning "mcstatus is deprecated; calling mc-monitor instead"
##### mcstatus shim for mc-monitor
# handles translating calls to
@@ -11,8 +11,8 @@ addr="$1"
IFS=':'
read -a parts <<< "${addr}"
args=(--host ${parts[0]})
if [[ ${#parts[*]} -gt 1 ]]; then
exec mc-monitor status --host ${parts[0]} --port ${parts[1]}
else
exec mc-monitor status --host ${parts[0]}
args+=(--port ${parts[1]})
fi
exec mc-monitor ${args[@]}

View File

@@ -24,6 +24,7 @@ apk add --no-cache -U \
tzdata \
rsync \
nano \
ncurses \
sudo \
tar \
zstd \

View File

@@ -46,6 +46,7 @@ dnf install -y \
libwebp \
findutils \
which \
glibc-langpack-en \
${EXTRA_DNF_PACKAGES}
# Install Git LFS

View File

@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.9
RUN pip install --upgrade pip

View File

@@ -4,14 +4,10 @@ title: Modifying config files
## Replacing variables inside configs
Sometimes you have mods or plugins that require configuration information that is only available at runtime.
For example if you need to configure a plugin to connect to a database,
you don't want to include this information in your Git repository or Docker image.
Or maybe you have some runtime information like the server name that needs to be set
in your config files after the container starts.
Sometimes you have mods or plugins that require configuration information that is only available at deploy-time. For example if you need to configure a plugin to connect to a database, you don't want to include this information in your Git repository or Docker image.
Or maybe you have some runtime information like the server name that needs to be set in your config files after the container starts.
For those cases there is the option to replace defined variables inside your configs
with environment variables defined at container runtime.
For those cases there is the option to replace defined variables inside your configs with environment variables defined at container runtime.
When the environment variable `REPLACE_ENV_IN_PLACE` is set to `true` (the default), the startup script will go through all files inside the container's `/data` path and replace variables that match the container's environment variables. Variables can instead (or in addition to) be replaced in files sync'ed from `/plugins`, `/mods`, and `/config` by setting `REPLACE_ENV_DURING_SYNC` to `true` (defaults to `false`).

View File

@@ -55,6 +55,16 @@ To allow time for players to finish what they're doing during a graceful server
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
The `STOP_SERVER_ANNOUNCE_DELAY` can be bypassed by sending a `SIGUSR1` signal to the `mc-server-runner` process.
`docker`:
docker stop --signal SIGUSR1 mc
`docker compose`:
docker compose kill --signal SIGUSR1
## Configuration Options for Minecraft Server Health Monitoring
The image tags include specific variables to simplify configuration for monitoring the health of a Minecraft server:

View File

@@ -197,14 +197,34 @@ New to [22W42A](https://www.minecraft.net/en-us/article/minecraft-snapshot-22w42
### Server icon
A server icon can be configured using the `ICON` variable. The image will be automatically
downloaded, scaled, and converted from any other image format:
A server icon can be configured by setting the `ICON` variable to a URL to download or a container path. The image will be automatically downloaded (if a URL), scaled, and converted from any other image format:
!!! example
Using `docker run`:
```
docker run -d -e ICON=http://..../some/image.png ...
```
In compose file:
```yaml
environment:
ICON: http://..../some/image.png
```
Using a file from host filesystem:
```yaml
environment:
ICON: /icon.png
OVERRIDE_ICON: true
volumes:
./icon.png:/icon.png
```
The server icon which has been set doesn't get overridden by default. It can be changed and overridden by setting `OVERRIDE_ICON` to `TRUE`.
docker run -d -e ICON=http://..../some/other/image.png -e OVERRIDE_ICON=TRUE...
By default an existing `server-icon.png` file will not be replaced, that can be changed by setting `OVERRIDE_ICON` to "true".
### RCON
@@ -502,4 +522,4 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
| LOG_IPS | log-ips |
| REGION_FILE_COMPRESSION | region-file-compression |
| BUG_REPORT_LINK | bug-report-link |
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |

View File

@@ -19,7 +19,7 @@ where, in this case, the standard server port 25565, will be exposed on your hos
!!! note
If you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#using-docker-compose) or [Kubernetes](#deployment-templates-and-examples) to allow for incremental reconfiguration and image upgrades.
If you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#using-docker-compose) or [Kubernetes](misc/deployment/index.md#on-kubernetes) to allow for incremental reconfiguration and image upgrades.
!!! info
@@ -58,6 +58,9 @@ To apply changes made to the compose file, just run `docker compose up -d` again
Follow the logs of the container using `docker compose logs -f`, check on the status with `docker compose ps`, and stop the container using `docker compose stop`.
!!! note "Configurator Tool"
If you prefer to use an interactive tool to create or edit a Docker Compose file for this image, you can check out [setupmc.com's configurator](https://setupmc.com/java-server/). It provides a form that supports most of the image variables and generates the `compose.yml` file in real time.
!!! note "More Compose Examples"
There are more [examples located in the Github repo](https://github.com/itzg/docker-minecraft-server/tree/master/examples).

View File

@@ -16,7 +16,7 @@ A file called `.paused` is created in `/data` directory when the server is pause
A `.skip-pause` file can be created in the `/data` directory to make the server skip autopausing, for as long as the file is present. The autopause timer will also be reset.
A starting, example compose file has been provided in [examples/docker-compose-autopause.yml](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-autopause.yml).
A starting, example compose file has been provided in [the examples](https://github.com/itzg/docker-minecraft-server/blob/master/examples/autopause/compose.yml).
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
@@ -38,6 +38,8 @@ The following environment variables define the behaviour of auto-pausing:
describes period of the daemonized state machine, that handles the pausing of the process (resuming is done independently)
- `AUTOPAUSE_KNOCK_INTERFACE`, default `eth0`
<br>Describes the interface passed to the `knockd` daemon. If the default interface does not work, run the `ifconfig` command inside the container and derive the interface receiving the incoming connection from its output. The passed interface must exist inside the container. Using the loopback interface (`lo`) does likely not yield the desired results.
- `AUTOPAUSE_STATUS_RETRY_LIMIT`, default 10
- `AUTOPAUSE_STATUS_RETRY_INTERVAL`, default 2s
!!! tip

View File

@@ -17,12 +17,14 @@ Enable the Autostop functionality by setting:
```
The following environment variables define the behavior of auto-stopping:
* `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
- `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
describes the time between the last client disconnect and the stopping of the server (read as timeout established)
* `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
- `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
describes the time between server start and the stopping of the server, when no client connects in-between (read as timeout initialized)
* `AUTOSTOP_PERIOD`, default `10` (seconds)
- `AUTOSTOP_PERIOD`, default `10` (seconds)
describes period of the daemonized state machine, that handles the stopping of the server
- `AUTOPAUSE_STATUS_RETRY_LIMIT`, default 10
- `AUTOPAUSE_STATUS_RETRY_INTERVAL`, default 2s
> To troubleshoot, add `DEBUG_AUTOSTOP=true` to see additional output

View File

@@ -31,15 +31,33 @@ services:
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
```yaml
# Lazymc requires that the minecraft server have a static IP.
#
# To ensure that our servers have a static IP we need to create
# a network for our services to use.
#
# By default, Docker uses 172.17.0.0/16 subnet range.
# So we need to create a new network in a different subnet
# See the readme for more information.
#
# Please ensure that the subnet falls within the private CIDRs:
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
#
# And that it is not in use by anything else.
networks:
minecraft-network:
driver: bridge
ipam:
config:
- subnet: 172.18.0.0/16
services:
lazymc:
container_name: lazymc
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
environment:
# Point to the service name of the Minecraft server
SERVER_ADDRESS: mc:25565
# Required to find the container to manage it
LAZYMC_GROUP: mc
# the IPs should start at .2 as .1 is reserved for the gateway
networks:
minecraft-network:
ipv4_address: 172.18.0.2
restart: unless-stopped
volumes:
# you should mount the minecraft server dir under /server, using read only.
@@ -54,11 +72,19 @@ services:
# Standard Docker Minecraft server, also works with other server types
mc:
image: itzg/minecraft-server:java21
container_name: minecraft-server
# Assign a static IP to the server container
networks:
minecraft-network:
ipv4_address: 172.18.0.3
# We need to add a label here so that lazymc-docker-proxy knows which
# container to manage
labels:
# Set lazymc.enabled to true to enable lazymc on this container
- lazymc.enabled=true
# Required to find the container to manage it
- lazymc.group=mc
# Point to the service name of the Minecraft server
- lazymc.server.address=mc:25565
tty: true
stdin_open: true
# This container should be managed solely by the lazymc container
@@ -113,4 +139,4 @@ services:
stdin_open: true
restart: unless-stopped
```
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)

View File

@@ -80,6 +80,10 @@ Example of expected VanillaTweaks share codes:
VANILLATWEAKS_SHARECODE: MGr52E,tF1zL2,LnEDwT
```
!!! note
Datapack names are all lower case. [See their spec](https://vanillatweaks.net/assets/resources/json/1.21/dpcategories.json) for a full list of 1.21 datapacks, and [their spec](https://vanillatweaks.net/assets/resources/json/1.21/ctcategories.json) for a full list of 1.21 crafting tweaks.
Example of expected VanillaTweaks files:
``` yaml
@@ -89,13 +93,14 @@ VANILLATWEAKS_FILE: /config/vt-datapacks.json,/config/vt-craftingtweaks.json,/co
``` json title="DataPacks json"
{
"type": "datapacks",
"version": "1.18",
"version": "1.21",
"packs": {
"survival": [
"gameplay changes": [
"graves",
"multiplayer sleep"
"multiplayer sleep",
"armored elytra"
],
"items": ["armored elytra"]
"teleport commands": ["tpa"]
}
}
```
@@ -103,7 +108,7 @@ VANILLATWEAKS_FILE: /config/vt-datapacks.json,/config/vt-craftingtweaks.json,/co
``` json title="ResourcePacks json"
{
"type": "resourcepacks",
"version": "1.18",
"version": "1.21",
"packs": {
"aesthetic": ["CherryPicking", "BlackNetherBricks", "AlternateBlockDestruction"]
}
@@ -114,7 +119,7 @@ VANILLATWEAKS_FILE: /config/vt-datapacks.json,/config/vt-craftingtweaks.json,/co
``` json title="CraftingTweaks Json"
{
"type": "craftingtweaks",
"version": "1.18",
"version": "1.21",
"packs": {
"quality of life": [
"dropper to dispenser",

View File

@@ -22,22 +22,27 @@ The following formats are supported in the list of project-file references:
- Project ID, such as `238222`. _The newest applicable file will be automatically selected._
- Project slug or ID, `:`, and a file ID, such as `jei:4593548` or `238222:4593548`
- Project slug or ID, `@`, and a partial filename, such as `jei@10.2.1.1005`. This option is useful to refer to a version of the mod/plugin rather than looking up the file ID.
- An `@` followed by the **container path** to a listing file
An `@` followed by the container path to a listing file can also be provided as a project-file reference. Each line is processed as a reference where blank lines and comments that start with `#` are ignored.
!!! info "More about listing files"
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt" where the container file `/extras/cf-mods.txt` contains
Each line in the listing file is processed as one of the references above; however, blank lines and comments that start with `#` are ignored.
Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it.
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt", assuming "/extras" has been added to `volumes` section, where the container file `/extras/cf-mods.txt` contains
```text
# This comment is ignored
jei:10.2.1.1005
# This and previous blank line are ignore
geckolib
aquaculture
naturalist
```
```text
# This comment is ignored
jei:10.2.1.1005
# This and previous blank line are ignore
geckolib
aquaculture
naturalist
```
!!! tip "Docker Compose"
!!! tip "Multi-line values in Docker Compose"
Making use of the space delimited option, compose file declarations can be organized nicely with a [multi-line string](https://yaml-multiline.info/), such as

View File

@@ -1,10 +1,10 @@
# Working with mods and plugins
## Mod platforms
## Modpack platforms
By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported mod platforms](../types-and-platforms/index.md).
By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported modpack platforms](../types-and-platforms/index.md).
The following are some supported mod platforms:
The following are some supported modpack platforms:
- [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md)
- [CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md)
@@ -23,7 +23,7 @@ The terms "mods" and "plugins" can be quite confusing. Generally, the rule of th
There are optional volume paths that can be attached to supply content to be copied into the data area:
`/plugins`
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`.
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`. If using a mod-based loader, such as Forge or Fabric, but a hybrid mod like [Cardboard](https://modrinth.com/mod/cardboard), then set `USES_PLUGINS` to have the automation utilize `/plugins` mount.
`/mods`
: content in this directory is synchronized into `/data/mods` for server types that use mods, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_MODS_SRC` and destination by setting `COPY_MODS_DEST`.
@@ -78,9 +78,24 @@ If applying large generic packs, the update can be time-consuming. To skip the u
The most time-consuming portion of the generic pack update is generating and comparing the SHA1 checksum. To skip the checksum generation, set `SKIP_GENERIC_PACK_CHECKSUM` to "true".
To disable specific mods, which can be useful for conflicts between multiple generic packs, you can use the `GENERIC_PACKS_DISABLE_MODS` variable to specify mods to disable.
Disabling mods with docker run:
```shell
docker run -d -e GENERIC_PACKS_DISABLE_MODS="mod1.jar mod2.jar" ...
```
Disabling mods within docker compose files:
```yaml
GENERIC_PACKS_DISABLE_MODS: |
mod1.jar
mod2.jar
```
## Mods/plugins list
You may also download or copy over individual mods/plugins using the `MODS` or `PLUGINS` environment variables. Both are a comma or newline delimited list of
- URL of a jar file
- container path to a jar file
- container path to a directory containing jar files

View File

@@ -1,8 +1,8 @@
# Auto-download from Modrinth
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric and Forge mods](https://modrinth.com/mods). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric, Forge, etc mods](https://modrinth.com/mods) and [Paper, etc plugins](https://modrinth.com/plugins), and [datapacks](https://modrinth.com/datapacks). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The slug is the part of the page URL that follows `/mod/`:
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
```
https://modrinth.com/mod/fabric-api
----------

View File

@@ -1,7 +1,7 @@
mkdocs-material == 9.5.40
mkdocs-autorefs == 1.2.0
mkdocstrings == 0.26.2
mkdocs-material == 9.6.8
mkdocs-autorefs == 1.4.1
mkdocstrings[python] == 0.29.0
mkdocs-literate-nav == 0.6.1
mdx-gh-links == 0.4
mkdocs-click == 0.8.1
mkdocs-static-i18n == 1.2.3
mkdocs-static-i18n == 1.3.0

View File

@@ -1,4 +1,4 @@
# Server Types and Mod Platforms
# Server Types and Modpack Platforms
Server types can be selected by setting the `TYPE` environment variable to one of the types described in these sections.
@@ -6,7 +6,7 @@ The default server type is [the official software provided by Mojang](https://ww
**From the sections to the left...**
The **mod platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The mod platforms are selected by setting `MOD_PLATFORM`; however, for ease of use and compatibility, the selection can be set in `TYPE`.
The **modpack platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The modpack platforms are selected by setting `MODPACK_PLATFORM`; however, for ease of use and backward compatibility, the selection can be set in `TYPE` or `MOD_PLATFORM`.
The individual **server types** allow for selecting the mod loader / server type and specific versions of those.

View File

@@ -1,6 +1,6 @@
# Auto CurseForge
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
## API Key
@@ -56,7 +56,9 @@ For example:
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
```
The latest file will be located and used by default, but if a specific version is desired you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup.
### Pinning modpack and mod loader versions
The latest modpack file and its associated mod loader will be located and installed by default on startup (including automatic upgrading of both on subsequent startups, if a later version is found on CurseForge). If a specific version is desired instead, you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup.
- Use `CF_PAGE_URL`, but include the full URL to a specific file
- Set `CF_FILE_ID` to the numerical file ID
@@ -82,6 +84,8 @@ The following examples all refer to version 1.0.7 of ATM8:
CF_FILENAME_MATCHER: 1.0.7
```
Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack.
## Manual Downloads
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
@@ -116,7 +120,7 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
image: itzg/minecraft-server
environment:
EULA: true
MOD_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

View File

@@ -4,7 +4,7 @@
This mod platform type is deprecated. Please use [AUTO_CURSEFORGE](auto-curseforge.md) for new deployments.
Enable this server mode by setting `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
Enable this server mode by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
You need to specify a modpack to run, using the `CF_SERVER_MOD` environment
variable. A CurseForge server modpack is available together with its respective

View File

@@ -3,7 +3,7 @@
!!! note
Requires one of the Ubuntu with Hotspot images listed in [the Java versions section](../../versions/java.md).
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MOD_PLATFORM` or `TYPE` to "FTBA"
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "FTBA"
!!! note
The "A" at the end of "FTBA" is important. The value "FTB" used to be an alias for "CURSEFORGE".

View File

@@ -1,6 +1,6 @@
# Modrinth Modpacks
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
## Modpack project

View File

@@ -1,5 +1,9 @@
# Bukkit/Spigot
!!! failure "GetBukkit site no longer supports automated downloads"
The downloads provider <https://getbukkit.org> seems to no longer support automated downloads. As such, it is highly recommended to switch to [Paper](paper.md) instead since it is actively maintained and fully compatible with Bukkit/Spigot plugins.
Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
!!! example

View File

@@ -1,5 +1,13 @@
A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded, upgraded, and run by setting the environment variable `TYPE` to "FORGE".
!!! note "A note from the installer"
> Please do not automate the download and installation of Forge.
Our efforts are supported by ads from the download page.
If you MUST automate this, please consider supporting the project through <https://www.patreon.com/LexManos/>
Since my project also relies on donations, please pass it along and consider contributing to the Patreon above.
!!! example
```
@@ -14,6 +22,7 @@ A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded
The overall version is specified by `VERSION`, [as described in the section above](../../versions/minecraft.md) and provides the same benefits of upgrading as new versions are released. By default, the recommended version of Forge for that Minecraft version will be selected. The latest version can be selected instead by setting the environment variable `FORGE_VERSION` to "latest". You can also choose a specific Forge version by setting `FORGE_VERSION` with that version, such as "14.23.5.2854".
!!! example
```
@@ -55,3 +64,22 @@ Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge serv
VERSION: "1.20.4"
NEOFORGE_VERSION: "beta"
```
### Cleanroom
[Cleanroom](https://github.com/CleanroomMC/Cleanroom) isn't fully automated, but can be utilized by...
1. choose the desired release at https://github.com/CleanroomMC/Cleanroom/releases
2. grab the link to the `*-installer.jar` file in that release
3. with `TYPE` set to "FORGE", set `FORGE_INSTALLER_URL` to the installer jar's link
!!! example
In docker compose `environment`
```yaml
TYPE: FORGE
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
```
[Full example](https://github.com/itzg/docker-minecraft-server/tree/master/examples/cleanroom)

View File

@@ -6,6 +6,8 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
!!! example
Using `docker run` command line
```
docker run ... -e TYPE=PAPER ...
@@ -15,6 +17,26 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ...
```
Using a compose file:
```yaml
environment:
TYPE: PAPER
```
```yaml
environment:
TYPE: PAPER
VERSION: 1.20.6
PAPER_BUILD: 140
```
```yaml
environment:
TYPE: PAPER
PAPER_CHANNEL: experimental
```
!!! tip

View File

@@ -14,6 +14,8 @@ where `<tag>` refers to the first column of this table:
|------------------|--------------|--------|--------------------|---------------------|
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 |
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 |
| java23 | 23 | Ubuntu | Hotspot | amd64, arm64 |
| java23-graalvm | 23 | Oracle | Oracle GraalVM[^1] | amd64, arm64 |
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 |
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 |
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 |

View File

@@ -3,8 +3,11 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# from .env
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_FILENAME_MATCHER: 1.2.2

View File

@@ -0,0 +1,28 @@
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: true
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
# Optional: select a specific version/file
# CF_FILENAME_MATCHER: "1.17"
MEMORY: 4G
CF_OVERRIDES_EXCLUSIONS: |
shaderpacks/**
volumes:
# Use managed volume by default, but can change to a relative path like
# ./data:/data
# to use a host directory
- mc-data:/data
volumes:
mc-data:

View File

@@ -5,8 +5,11 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
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_FILENAME_MATCHER: "1.1.0"

View File

@@ -5,8 +5,11 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
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
# Optional: select a specific version/file

View File

@@ -3,8 +3,11 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
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_SLUG: "custom"

View File

@@ -5,41 +5,13 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
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_EXCLUDE_MODS: |
cherished-worlds
controlling
ctm
custom-main-menu
ding
minecraft-rich-presence
enchantment-descriptions
just-enough-harvestcraft
just-enough-resources-jer
menumobs
more-overlays
mouse-tweaks
oldjavawarning
overloaded-armor-bar
reauth
thaumic-jei
tips
armor-toughness-bar
waila-harvestability
ambientsounds
biomeinfo
block-drops-jei-addon
loot-capacitor-tooltips
no-recipe-book
packmodemenu
resource-reloader
# blockdrops
CF_FORCE_SYNCHRONIZE: "true"
MEMORY: 4G
volumes:
- mc-data:/data

View File

@@ -7,11 +7,13 @@ services:
- "mc:/data"
environment:
EULA: "TRUE"
TYPE: PAPER
ENABLE_AUTOPAUSE: "TRUE"
MAX_TICK_TIME: "-1"
# More aggressive settings for demo purposes
AUTOPAUSE_TIMEOUT_INIT: "30"
AUTOPAUSE_TIMEOUT_EST: "10"
JVM_DD_OPTS: "disable.watchdog:true"
restart: unless-stopped
volumes:

View File

@@ -3,8 +3,11 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
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_FILENAME_MATCHER: v18.5

View File

@@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: MODRINTH
MODPACK_PLATFORM: MODRINTH
MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v32.5
MODRINTH_EXCLUDE_FILES: |
XaeroPlus

View File

@@ -0,0 +1,13 @@
services:
mc:
image: itzg/minecraft-server:java8
environment:
EULA: true
TYPE: canyon
VERSION: b1.7.3
ports:
- "25565:25565"
volumes:
- mc-data:/data
volumes:
mc-data:

View File

@@ -0,0 +1,15 @@
# Provides an example of running CleanroomMC from https://github.com/CleanroomMC/Cleanroom,
# which is a Forge fork
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
TYPE: FORGE
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
ports:
- "25565:25565"
volumes:
- mc-data:/data
volumes:
mc-data:

View File

@@ -0,0 +1,38 @@
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: true
ALLOW_FLIGHT: true
MOD_PLATFORM: AUTO_CURSEFORGE
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: craftoria
MEMORY: 8G
# TODO: replace with slugs and see if already excluded by cf-exclude-include.json
CF_EXCLUDE_MODS: |
737481
363363
394468
986380
844662
568563
915902
690971
455508
1089803
511319
volumes:
# Use managed volume by default, but can change to a relative path like
# ./data:/data
# to use a host directory
- mc-data:/data
volumes:
mc-data:

View File

@@ -4,7 +4,10 @@ services:
environment:
EULA: true
TYPE: FORGE
# allocate from https://console.curseforge.com/ and set in .env file
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY}
VERSION: 1.19.2
CURSEFORGE_FILES: |

View File

@@ -13,8 +13,11 @@ services:
- ./data:/data
ngrok:
image: shkoliar/ngrok:latest
ports:
- 4551:4551
image: ngrok/ngrok:latest
command:
- "tcp"
- "mc:25565"
environment:
- PARAMS=tcp -region=us -authtoken=YourAuthTokenHere mc:25565
NGROK_AUTHTOKEN: <YourAuthTokenHere>
ports:
- 4551:4551

View File

@@ -12,7 +12,10 @@ services:
CURSEFORGE_FILES: |
fabric-api
chunky-pregenerator
# allocate from https://console.curseforge.com/ and set in .env file
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY}
# YAML Heredoc, be sure to use '|-' this will remove the first newline and final new line.
# This is versus '|' that will leaving with two empty strings at top and bottom.

View File

@@ -0,0 +1,20 @@
services:
mc:
image: itzg/minecraft-server:latest
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: "FABRIC"
MEMORY: 4G
MODRINTH_PROJECTS: |
fabric-api
cardboard:beta
USES_PLUGINS: true
volumes:
- mc-data:/data
- ./plugins:/plugins:ro
volumes:
mc-data:

View File

@@ -4,6 +4,9 @@ services:
environment:
EULA: "true"
TYPE: FABRIC
# VERSION: 1.21.4
# FABRIC_INSTALLER_VERSION: 1.0.1
# FABRIC_LOADER_VERSION: 0.16.10
ports:
- "25565:25565"
volumes:

View File

@@ -0,0 +1,25 @@
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
# Game port
- "25565:25565/tcp"
environment:
EULA: "TRUE"
TYPE: AUTO_CURSEFORGE
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/ftb-evolution
# This modpack includes an override client-side only mod that will prevent the server from starting.
# For more information on override exclusions see:
# https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#excluding-overrides-files
CF_OVERRIDES_EXCLUSIONS: mods/rgp_client*.jar
MEMORY: 6G
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data

View File

@@ -1,22 +1,21 @@
services:
mc:
# FTBA support is only available in non-Alpine images
image: itzg/minecraft-server:${IMAGE_TAG:-java8-multiarch}
image: itzg/minecraft-server
ports:
# expose the Minecraft server port outside of container
- 25565:25565
- "25565:25565"
environment:
# REQUIRED for all types
EULA: "TRUE"
# Set server type (vs the default of vanilla)
TYPE: FTBA
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
FTB_MODPACK_ID: "31"
FTB_MODPACK_VERSION_ID: ""
# Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about
FTB_MODPACK_ID: "119"
# FTB_MODPACK_VERSION_ID: ""
volumes:
# use a named, managed volume for data volume
- ftba:/data
- data:/data
volumes:
# declared the named volume, but use default/local storage engine
ftba: {}
data: {}

View File

@@ -0,0 +1,25 @@
services:
mc:
# make sure this java version matches with pack java version
image: itzg/minecraft-server:java21
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: CUSTOM
GENERIC_PACKS: GT_New_Horizons_2.7.2_Server_Java_17-21
GENERIC_PACKS_SUFFIX: .zip
GENERIC_PACKS_PREFIX: https://downloads.gtnewhorizons.com/ServerPacks/
# if this isn't true, then the container tries to download the modpack every run
SKIP_GENERIC_PACK_UPDATE_CHECK: "true"
MEMORY: 6G
# Make sure that this matches what is in your pack's startserver bash file
JVM_OPTS: -Dfml.readTimeout=180 @java9args.txt
CUSTOM_JAR_EXEC: -jar lwjgl3ify-forgePatches.jar nogui
volumes:
# attach a managed volume, change to a relative or absolute host directory if needed
- mc-data:/data
volumes:
mc-data:

View File

@@ -5,6 +5,10 @@ services:
EULA: true
TYPE: KETTING
VERSION: 1.20.1
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: "${CF_API_KEY}"
CURSEFORGE_FILES: https://www.curseforge.com/minecraft/mc-mods/aquaculture
ports:

View File

@@ -1,12 +1,30 @@
# Lazymc requires that the minecraft server have a static IP.
#
# To ensure that our servers have a static IP we need to create
# a network for our services to use.
#
# By default, Docker uses 172.17.0.0/16 subnet range.
# So we need to create a new network in a different subnet
# See the readme for more information.
#
# Please ensure that the subnet falls within the private CIDRs:
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
#
# And that it is not in use by anything else.
networks:
minecraft-network:
driver: bridge
ipam:
config:
- subnet: 172.18.0.0/16
services:
lazymc:
container_name: lazymc
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
environment:
# Point to the service name of the Minecraft server
SERVER_ADDRESS: mc:25565
# Required to find the container to manage it
LAZYMC_GROUP: mc
# the IPs should start at .2 as .1 is reserved for the gateway
networks:
minecraft-network:
ipv4_address: 172.18.0.2
restart: unless-stopped
volumes:
# you should mount the minecraft server dir under /server, using read only.
@@ -21,11 +39,19 @@ services:
# Standard Docker Minecraft server, also works with other server types
mc:
image: itzg/minecraft-server:java21
container_name: minecraft-server
# Assign a static IP to the server container
networks:
minecraft-network:
ipv4_address: 172.18.0.3
# We need to add a label here so that lazymc-docker-proxy knows which
# container to manage
labels:
# Set lazymc.enabled to true to enable lazymc on this container
- lazymc.enabled=true
# Required to find the container to manage it
- lazymc.group=mc
# Point to the service name of the Minecraft server
- lazymc.server.address=mc:25565
tty: true
stdin_open: true
# This container should be managed solely by the lazymc container

View File

@@ -7,7 +7,7 @@ services:
- "25565:25565"
environment:
EULA: "TRUE"
MOD_PLATFORM: MODRINTH
MODPACK_PLATFORM: MODRINTH
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
# or for auto-upgrading to latest
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric

View File

@@ -3,13 +3,15 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: MODRINTH
MODPACK_PLATFORM: MODRINTH
# Download the mrpack file from https://modrinth.com/modpack/cobblemon-fabric/version/1.4.1 and place in
# modpacks directory next to this compose file.
MODRINTH_MODPACK: /modpacks/Cobblemon Modpack [Fabric] 1.4.1.mrpack
ports:
- "25565:25565"
volumes:
- mc-data:/data
- ./modpacks:/modpacks:ro
volumes:
mc-data: {}
mc-data: {}

View File

@@ -4,7 +4,7 @@ services:
environment:
EULA: true
MOTD: |
line one
A §l§cMinecraft§r server
line two
# or
# MOTD: "line one\nline two"

View File

@@ -5,8 +5,11 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# CF_API_KEY=... must be set in .env file or as environment variable
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
# Modpack client zip must be manually downloaded from

View File

@@ -5,8 +5,12 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
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_FILENAME_MATCHER: "9.1.2"
MEMORY: 4G

View File

@@ -5,8 +5,11 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
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_FILENAME_MATCHER: "2.8.7"

View File

@@ -6,24 +6,21 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
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
# Optional: select a specific version/file
#CF_FILENAME_MATCHER: "0.2.34"
CF_EXCLUDE_MODS: |
controlling
craftpresence
creative-core
default-options
equipment-compare
item-borders
itemphysic-lite
konkrete
oauth
sound-filters
toast-control
CF_FORCE_SYNCHRONIZE: "true"
MEMORY: 4G
volumes:

View File

@@ -3,8 +3,11 @@ services:
image: itzg/minecraft-server:java8-multiarch
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
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_FILENAME_MATCHER: 2.9.3

View File

@@ -0,0 +1,22 @@
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
# https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/
MODPACK_PLATFORM: AUTO_CURSEFORGE
# CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/6044634
CF_SLUG: skyfactory-5
CF_FILENAME_MATCHER: 5.0.2
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY}
MEMORY: 4G
ports:
- "25565:25565"
volumes:
- mc-data:/data
volumes:
mc-data:

View File

@@ -5,8 +5,12 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
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_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560
MEMORY: 4G

View File

@@ -1,17 +1,19 @@
services:
mc:
image: itzg/minecraft-server
image: itzg/minecraft-server:java17
ports:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
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_FILENAME_MATCHER: "Update-10.0.0"
MOTD: "§4----- §2 Vault Hunters: 1.18.2u10.0.0 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
MOTD: "§4----- §2 Vault Hunters: 1.18.2 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
MEMORY: 6G # 4G for base server + 2G per player
CF_EXCLUDE_MODS: reauth
ALLOW_FLIGHT: true
ENABLE_COMMAND_BLOCK: true
DIFFICULTY: hard
@@ -19,4 +21,4 @@ services:
- mc-data:/data
volumes:
mc-data: {}
mc-data: {}

View File

@@ -24,14 +24,25 @@ use_proxy() {
fi
}
use_server_list_ping() {
if versionLessThan 1.7; then
echo "--use-server-list-ping"
fi
}
mc_server_listening() {
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --timeout 10s >&/dev/null
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" $(use_server_list_ping) --timeout 10s >&/dev/null
}
java_clients_connections() {
local connections
if java_running; then
if ! connections=$(mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --show-player-count); then
if ! connections=$(mc-monitor status \
--host "${SERVER_HOST:-localhost}" \
--port "$SERVER_PORT" \
--retry-limit "${AUTOPAUSE_STATUS_RETRY_LIMIT:-10}" --retry-interval "${AUTOPAUSE_STATUS_RETRY_INTERVAL:-2s}" \
$(use_proxy) $(use_server_list_ping) \
--show-player-count); then
# consider it a non-zero player count if the ping fails
# otherwise a laggy server with players connected could get paused
connections=1
@@ -44,4 +55,4 @@ java_clients_connections() {
java_clients_connected() {
(( $(java_clients_connections) > 0 ))
}
}

View File

@@ -1,10 +1,12 @@
{
"globalExcludes": [
"advancement-plaques",
"ambience-music-mod",
"ambientsounds",
"appleskin",
"armor-chroma",
"armor-toughness-bar",
"audio-extension-for-fancymenu-forge",
"auudio-forge",
"beehivetooltips",
"better-advancements",
@@ -22,10 +24,13 @@
"cherished-worlds",
"chunk-animator",
"clickable-advancements",
"compass-coords",
"configured",
"controlling",
"craftpresence",
"ctm",
"custom-main-menu",
"dark-mode-everywhere",
"defensive-measures",
"ding",
"drippy-loading-screen",
@@ -41,6 +46,7 @@
"entity-collision-fps-fix",
"entity-texture-features-fabric",
"entityculling",
"equipment-compare",
"extreme-sound-muffler",
"ezzoom",
"fading-night-vision",
@@ -53,23 +59,28 @@
"ftb-backups-2",
"fullscreen-windowed-borderless-for-minecraft",
"hwyla",
"iceberg",
"ignitioncoil",
"inmisaddon",
"iris-flywheel-compat",
"irisshaders",
"item-borders",
"item-highlighter",
"item-obliterator",
"itemphysic-lite",
"itemzoom",
"just-enough-harvestcraft",
"just-enough-mekanism-multiblocks",
"just-enough-resources-jer",
"just-zoom",
"konkrete",
"legendary-tooltips",
"lighty",
"loot-capacitor-tooltips",
"lootbeams",
"magnesium-extras",
"menumobs",
"minecraft-rich-presence",
"model-gap-fix",
"more-overlays",
"mouse-tweaks",
"neat",
@@ -80,9 +91,11 @@
"oculus",
"oldjavawarning",
"overloaded-armor-bar",
"packmenu",
"packmodemenu",
"reauth",
"reblured",
"reeses-sodium-options",
"reforgium",
"resource-reloader",
"rubidium",
@@ -98,7 +111,11 @@
"smooth-font",
"smoothwater",
"sodium",
"sodium-extra",
"sodium-options-api",
"sodium-rubidium-occlusion-culling-fix",
"sound",
"sound-reloader",
"sound-filters",
"sound-physics-remastered",
"stellar-sky",
@@ -107,29 +124,34 @@
"textrues-rubidium-options",
"thaumic-jei",
"tips",
"toast-control",
"torohealth-damage-indicators",
"true-darkness",
"ungrab-mouse-mod",
"vanillafix",
"visuality",
"waila-harvestability",
"wawla",
"xaeroplus",
"yungs-menu-tweaks",
"zume"
],
"modpacks": {
"all-of-fabric-6": {
"forceIncludes": ["revelationary"]
},
"create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"]
},
"skyfactory-5": {
"forceIncludes": [
"revelationary"
"colored-torches",
"dye-mob-dye",
"openstairs"
]
},
"valhelsia-5": {
"excludes": [
"modernfix"
]
},
"create-arcane-engineering": {
"forceIncludes": [
"just-enough-resources-jer"
]
"excludes": ["modernfix"]
}
}
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.mojang.util">
<Configuration status="WARN">
<Appenders>
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
@@ -34,4 +34,4 @@
<AppenderRef ref="TerminalConsole"/>
</Root>
</Loggers>
</Configuration>
</Configuration>

View File

@@ -22,7 +22,11 @@
"cherishedworlds",
"citresewn",
"clickadv",
"compass-coords",
"connectedness",
"connector",
"craftpresence",
"cwb",
"DisableCustomWorldsAdvice",
"drippyloadingscreen",
"eating-animation",
@@ -36,6 +40,8 @@
"fancymenu",
"fast-ip-ping",
"FauxCustomEntityData",
"feytweaks",
"figura",
"GeckoLibIrisCompat",
"gpumemleakfix",
"Highlighter",
@@ -60,9 +66,11 @@
"PickUpNotifier",
"PresenceFootsteps",
"Prism",
"reforgium",
"reeses_sodium_options",
"ResourcePackOverrides",
"ryoamiclights",
"screenshot_viewer",
"Searchables",
"seasonhud",
"ShoulderSurfing",
@@ -73,8 +81,9 @@
"VR-Combat",
"YeetusExperimentus",
"yungsmenutweaks",
"Zoomify"
"Zoomify",
"zume"
],
"globalForceIncludes": [],
"modpacks": {}
}
}

View File

@@ -39,7 +39,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
fi
fi
if isTrue "${SKIP_CHOWN_DATA}" || [[ $(stat -c "%u" /data) != "$UID" ]]; then
if isFalse "${SKIP_CHOWN_DATA}" && [[ $(stat -c "%u" /data) != "$UID" ]]; then
log "Changing ownership of /data to $UID ..."
chown -R ${runAsUser}:${runAsGroup} /data
fi
@@ -48,12 +48,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
echo 'hosts: files dns' > /etc/nsswitch.conf
fi
distro=$(getDistro)
if [[ $distro == alpine ]]; then
exec su-exec ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
else
exec gosu ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
fi
exec $(getSudoFromDistro) ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
else
exec "${SCRIPTS:-/}start-configuration" "$@"
fi

View File

@@ -26,60 +26,40 @@ isDebugging && set -x
cp /auto/knockd-config.cfg /tmp/knockd-config.cfg
# update server port to listen to
regseq="^\s*sequence\s*=\s*$SERVER_PORT\s*$"
linenum=$(grep -nm1 sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
sed -i "${linenum}s/sequence.*/sequence = $SERVER_PORT/" /tmp/knockd-config.cfg
log "Updated server port in knockd config"
fi
# update rcon port to listen to
regseq="^\s*sequence\s*=\s*$RCON_PORT\s*$"
linenum=$(grep -nm2 sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
sed -i "${linenum}s/sequence.*/sequence = $RCON_PORT/" /tmp/knockd-config.cfg
log "Updated rcon port in knockd config"
fi
function updatePort() {
regseq="^\s*sequence\s*=\s*$1\s*$"
linenum=$(grep -nm${2} sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
sed -i "${linenum}s/sequence.*/sequence = $1/" /tmp/knockd-config.cfg
log "Updated $3 port in knockd config"
fi
}
# update server port to listen to
updatePort $SERVER_PORT 1 "server"
# update rcon port to listen to
updatePort $RCON_PORT 2 "rcon"
isNumericElseSetToDefault "AUTOPAUSE_PERIOD" 10
checkIfNotZeroElseSetToDefault "AUTOPAUSE_PERIOD" 10
isNumericElseSetToDefault "AUTOPAUSE_TIMEOUT_KN" 120
isNumericElseSetToDefault "AUTOPAUSE_TIMEOUT_EST" 3600
isNumericElseSetToDefault "AUTOPAUSE_TIMEOUT_INIT" 600
if ! [[ $AUTOPAUSE_PERIOD =~ ^[0-9]+$ ]]; then
AUTOPAUSE_PERIOD=10
export AUTOPAUSE_PERIOD
log "Warning: AUTOPAUSE_PERIOD is not numeric, set to 10 (seconds)"
fi
if [ "$AUTOPAUSE_PERIOD" -eq "0" ] ; then
AUTOPAUSE_PERIOD=10
export AUTOPAUSE_PERIOD
log "Warning: AUTOPAUSE_PERIOD must not be 0, set to 10 (seconds)"
fi
if ! [[ $AUTOPAUSE_TIMEOUT_KN =~ ^[0-9]+$ ]] ; then
AUTOPAUSE_TIMEOUT_KN=120
export AUTOPAUSE_TIMEOUT_KN
log "Warning: AUTOPAUSE_TIMEOUT_KN is not numeric, set to 120 (seconds)"
fi
if ! [[ $AUTOPAUSE_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
AUTOPAUSE_TIMEOUT_EST=3600
export AUTOPAUSE_TIMEOUT_EST
log "Warning: AUTOPAUSE_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
fi
if ! [[ $AUTOPAUSE_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
AUTOPAUSE_TIMEOUT_INIT=600
export AUTOPAUSE_TIMEOUT_INIT
log "Warning: AUTOPAUSE_TIMEOUT_INIT is not numeric, set to 600 (seconds)"
fi
if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
log "Warning: AUTOPAUSE_KNOCK_INTERFACE is set to the local loopback interface."
log " This is not advisable, as incoming connections are likely not picked up there."
log " Continuing with this setting."
logWarning "AUTOPAUSE_KNOCK_INTERFACE is set to the local loopback interface."
logWarning " This is not advisable, as incoming connections are likely not picked up there."
logWarning " Continuing with this setting."
fi
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
log "Warning: MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
elif [[ -z "$MAX_TICK_TIME" ]] ; then
MAX_TICK_TIME=-1
if versionLessThan 1.8.1; then
# 10 years
MAX_TICK_TIME=315360000000
else
MAX_TICK_TIME=-1
fi
export MAX_TICK_TIME
fi

View File

@@ -20,25 +20,9 @@ log "Autostop functionality enabled"
isDebugging && set -x
if ! [[ $AUTOSTOP_PERIOD =~ ^[0-9]+$ ]]; then
AUTOSTOP_PERIOD=10
export AUTOSTOP_PERIOD
log "Warning: AUTOSTOP_PERIOD is not numeric, set to 10 (seconds)"
fi
if [ "$AUTOSTOP_PERIOD" -eq "0" ] ; then
AUTOSTOP_PERIOD=10
export AUTOSTOP_PERIOD
log "Warning: AUTOSTOP_PERIOD must not be 0, set to 10 (seconds)"
fi
if ! [[ $AUTOSTOP_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
AUTOSTOP_TIMEOUT_EST=3600
export AUTOSTOP_TIMEOUT_EST
log "Warning: AUTOSTOP_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
fi
if ! [[ $AUTOSTOP_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
AUTOSTOP_TIMEOUT_INIT=1800
export AUTOSTOP_TIMEOUT_INIT
log "Warning: AUTOSTOP_TIMEOUT_INIT is not numeric, set to 1800 (seconds)"
fi
isNumericElseSetToDefault "AUTOSTOP_PERIOD" 10
checkIfNotZeroElseSetToDefault "AUTOSTOP_PERIOD" 10
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_EST" 3600
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_INIT" 1800
/auto/autostop-daemon.sh &

View File

@@ -36,10 +36,10 @@ log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
if [ ! -e /data/eula.txt ]; then
if ! isTrue "$EULA"; then
log ""
log "Please accept the Minecraft EULA at"
log " https://account.mojang.com/documents/minecraft_eula"
log "by adding the following immediately after 'docker run':"
log " -e EULA=TRUE"
logError "Please accept the Minecraft EULA at"
logError " https://account.mojang.com/documents/minecraft_eula"
logError "by setting the container environment variable "
logError "EULA to \"true\""
log ""
exit 1
fi
@@ -63,10 +63,10 @@ if isTrue "${ENABLE_RCON:-true}"; then
if [[ -v RCON_PASSWORD_FILE ]]; then
if [ ! -e "${RCON_PASSWORD_FILE}" ]; then
log ""
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
log "Please ensure your configuration."
log "If you are using Docker Secrets feature, please check this for further information: "
log " https://docs.docker.com/engine/swarm/secrets"
logError "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
logError "Please ensure your configuration."
logError "If you are using Docker Secrets feature, please check this for further information: "
logError " https://docs.docker.com/engine/swarm/secrets"
log ""
exit 1
else
@@ -91,12 +91,12 @@ fi
# Auto-pause/stop
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
log "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
logError "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
exit 1
fi
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
log "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
logError "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
exit 1
fi
@@ -112,9 +112,9 @@ function fixJavaPath() {
# Some Docker management UIs grab all the image declared variables and present them for configuration.
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
if ! which java > /dev/null; then
log "ERROR: your Docker provider has an annoying flaw where it"
log " tries to set PATH even though the container establishes"
log " a very specific value."
logError " Your Docker provider has an annoying flaw where it"
logError " tries to set PATH even though the container establishes"
logError " a very specific value."
sleep 2
# now find where java might be
for d in /opt/java/openjdk/bin /usr/bin; do
@@ -129,7 +129,7 @@ function fixJavaPath() {
if ! fixJavaPath; then
log "ERROR: could not locate path that contains java"
logError "could not locate path that contains java"
exit 1
fi
@@ -158,15 +158,20 @@ then
"${SCRIPTS:-/}start-rconcmds"
fi
: "${MOD_PLATFORM:=}"
: "${MODPACK_PLATFORM:=${MOD_PLATFORM:-}}"
if [[ $MODPACK_PLATFORM && $TYPE && $TYPE != VANILLA ]]; then
logWarning "Avoid setting TYPE and MODPACK_PLATFORM"
fi
case "${TYPE^^}" in
AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA)
MOD_PLATFORM="$TYPE"
MODPACK_PLATFORM="$TYPE"
;;
esac
if [[ $MOD_PLATFORM ]]; then
case "${MOD_PLATFORM^^}" in
if [[ $MODPACK_PLATFORM ]]; then
case "${MODPACK_PLATFORM^^}" in
FTB|CURSEFORGE)
exec "${SCRIPTS:-/}start-deployCF" "$@"
;;
@@ -184,7 +189,7 @@ if [[ $MOD_PLATFORM ]]; then
;;
*)
log "ERROR; Invalid MOD_PLATFORM: '$MOD_PLATFORM'"
logError "Invalid MODPACK_PLATFORM: '$MODPACK_PLATFORM'"
exit 1
;;
esac
@@ -219,7 +224,7 @@ case "${TYPE^^}" in
QUILT)
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
;;
VANILLA)
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
;;
@@ -273,10 +278,10 @@ case "${TYPE^^}" in
;;
*)
log "ERROR: Invalid TYPE: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
log " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
log " CANYON, LIMBO, CRUCIBLE"
logError "Invalid TYPE: '$TYPE'"
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
logError " CANYON, LIMBO, CRUCIBLE"
exit 1
;;

View File

@@ -26,7 +26,7 @@ resultsFile=/data/.install-curseforge.env
isDebugging && set -x
ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"
ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE"
args=(
--results-file="$resultsFile"
@@ -57,15 +57,11 @@ setArg --exclude-include-file CF_EXCLUDE_INCLUDE_FILE
setArg --downloads-repo CF_DOWNLOADS_REPO
if ! mc-image-helper install-curseforge "${args[@]}"; then
log "ERROR failed to auto-install CurseForge modpack"
logError "Failed to auto-install CurseForge modpack"
exit 1
fi
# grab SERVER, TYPE, VERSION and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
applyResultsFile ${resultsFile}
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -6,47 +6,56 @@ isDebugging && set -x
set -eo pipefail
spigotBuildLog="/data/spigot_build.log"
function handleFailedSpigotBuild {
logError "Failed to build Spigot"
cat ${spigotBuildLog}
exit 1
}
function buildSpigotFromSource {
local tempDir="/data/temp"
if [[ ${TYPE^^} = *BUKKIT ]] && ! versionLessThan "1.14"; then
log "ERR craftbukkit build is only supported for versions less than 1.14"
logError "Craftbukkit build is only supported for versions less than 1.14"
exit 1
fi
log "Building Spigot $VANILLA_VERSION from source, might take a while, get some coffee"
rm -rf /data/temp
mkdir /data/temp
cd /data/temp
rm -rf ${tempDir}
mkdir ${tempDir}
cd ${tempDir}
jvmOpts="-Xms${INIT_MEMORY:-$MEMORY} -Xmx${MAX_MEMORY:-$MEMORY}"
logn ''
curl -sSL -o /data/temp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
java $jvmOpts -jar /data/temp/BuildTools.jar --rev "$VERSION" 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; log "done"
curl -sSL -o ${tempDir}/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
java $jvmOpts -jar ${tempDir}/BuildTools.jar --rev "$VERSION" 2>&1 |tee ${spigotBuildLog}| while read l; do echo -n .; done; log "done"
case ${TYPE^^} in
SPIGOT)
if ! mv spigot-*.jar "/data/${SERVER}"; then
log "ERR failed to build Spigot"
cat /data/spigot_build.log
exit 1
handleFailedSpigotBuild
fi
;;
*BUKKIT)
if ! mv craftbukkit-*.jar "/data/${SERVER}"; then
log "ERR failed to build Spigot"
cat /data/spigot_build.log
exit 1
handleFailedSpigotBuild
fi
;;
esac
log "Cleaning up"
rm -rf /data/temp
rm -rf ${tempDir}
cd /data
}
function downloadSpigot {
local match
local getBukkitBaseUrl="https://getbukkit.org/download/"
local getBukkitSpigotUrl="${getBukkitBaseUrl}spigot"
case "$TYPE" in
*BUKKIT|*bukkit)
match="CraftBukkit"
@@ -61,18 +70,21 @@ function downloadSpigot {
esac
if [[ ${VERSION^^} = LATEST ]]; then
if ! VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]'); then
log "ERROR: failed to retrieve latest version from https://getbukkit.org/download/spigot -- site might be down"
if ! VERSION=$(restify ${getBukkitSpigotUrl} --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]'); then
logError "Failed to retrieve latest version from ${getBukkitSpigotUrl} -- site might be down"
exit 1
fi
fi
if [[ -z $downloadUrl ]]; then
downloadBaseUrl="https://"
downloadSuffixUrl=".getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
if versionLessThan 1.16.5 || { [[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VERSION} = "1.16.5" ]] ; }; then
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
downloadBaseUrl+="cdn"
else
downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
downloadBaseUrl+="download"
fi
downloadUrl="${downloadBaseUrl}${downloadSuffixUrl}"
fi
setServerVar
@@ -94,7 +106,7 @@ function downloadSpigot {
cat <<EOF
ERROR: failed to download from $downloadUrl
Visit https://getbukkit.org/download/${getbukkitFlavor} to lookup the
Visit ${getBukkitBaseUrl}${getbukkitFlavor} to lookup the
exact version or see if download site is unavailable.
Click into the version entry to find the **exact** version.

View File

@@ -25,7 +25,7 @@ loadForgeVars() {
isDebugging && set -x
if [[ ${VERSION^^} == LATEST ]]; then
log "WARNING for the old TYPE=CURSEFORGE mechanism it is best to set VERSION to a specific value"
logWarning "For the old TYPE=CURSEFORGE mechanism it is best to set VERSION to a specific value"
fi
resolveVersion
@@ -39,7 +39,7 @@ FTB_SERVER_MOD=${FTB_SERVER_MOD:-$CF_SERVER_MOD}
log "Looking for Feed-The-Beast / CurseForge server modpack."
if [[ ! $FTB_SERVER_MOD ]]; then
log "ERROR: CF_SERVER_MOD or FTB_SERVER_MOD is required to be set"
logError "CF_SERVER_MOD or FTB_SERVER_MOD is required to be set"
exit 1
fi
@@ -48,7 +48,7 @@ downloadModpack() {
if isURL "${srv_modpack}"; then
log "Downloading modpack from ${srv_modpack}..."
if ! srv_modpack=$(get -o /data --output-filename --skip-existing "${srv_modpack}"); then
log "ERROR: failed to download modpack"
logError "Failed to download modpack"
exit 1
fi
fi
@@ -61,12 +61,12 @@ downloadModpack() {
srv_modpack=/data/${srv_modpack}
fi
if [[ ! -f "${srv_modpack}" ]]; then
log "FTB server modpack ${srv_modpack} not found."
logError "FTB server modpack: ${srv_modpack} not found."
exit 2
fi
if [[ ! "${srv_modpack: -4}" == ".zip" ]]; then
log "FTB server modpack ${srv_modpack} is not a zip archive."
log "Please set FTB_SERVER_MOD to a file with a .zip extension."
logError "FTB server modpack: ${srv_modpack} is not a zip archive."
logError "Please set FTB_SERVER_MOD to a file with a .zip extension."
exit 2
fi
FTB_SERVER_MOD=${srv_modpack}
@@ -104,7 +104,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
if [[ $forgeInstallerUrl ]]; then
forgeInstallerJar="${FTB_BASE_DIR}/forge-installer.jar"
if ! curl -fsSL -o "$forgeInstallerJar" "$forgeInstallerUrl" ; then
log "ERROR failed to download Forge installer from $forgeInstallerUrl"
logError "Failed to download Forge installer from $forgeInstallerUrl"
exit 2
fi
fi
@@ -113,9 +113,9 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
fi
if [[ -z "${forgeInstallerJar}" ]]; then
log "ERROR Unable to find forge installer in modpack"
log " or download using modpack config."
log " Make sure you downloaded the server files."
logError "Unable to find forge installer in modpack"
logError " or download using modpack config."
logError " Make sure you downloaded the server files."
exit 2
fi
@@ -129,7 +129,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
SERVER=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
log "ERROR unable to locate installed forge server jar"
logError "Unable to locate installed forge server jar"
isDebugging && find "${FTB_BASE_DIR}" -name "forge*.jar"
exit 2
fi
@@ -213,7 +213,7 @@ EOF
startScript="${FTB_BASE_DIR}/ServerStart.sh"
chmod +x "$startScript"
else
log "ERROR: Modpack missing start script and unable to find Forge jar to generate one"
logError "Modpack missing start script and unable to find Forge jar to generate one"
exit 2
fi
fi
@@ -244,7 +244,7 @@ legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar"
if isTrue "${FTB_LEGACYJAVAFIXER}" && [ ! -e "${legacyJavaFixerPath}" ]; then
log "Installing legacy java fixer to ${legacyJavaFixerPath}"
if ! get -o "${legacyJavaFixerPath}" ${legacyJavaFixerUrl}; then
log "ERROR failed to download legacy java fixer from ${legacyJavaFixerUrl}"
logError "Failed to download legacy java fixer from ${legacyJavaFixerUrl}"
exit 1
fi
fi

View File

@@ -9,20 +9,19 @@ isDebugging && set -x
: "${CANYON_BUILD:=lastSuccessfulBuild}"
if [ "${VERSION}" != "b1.7.3" ]; then
log "ERROR: Canyon server type only supports VERSION=b1.7.3"
logError "Canyon server type only supports VERSION=b1.7.3"
exit 1
fi
canyonJob="https://jenkins.glass-launcher.net/job/Canyon"
canyonJob="https://canyonmodded.p0rtal.gay/job/Canyonmodded"
githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
buildRelPath=$(
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
jq -r '.artifacts[0].relativePath'
)
jq -r '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
)
buildNumber=$(
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
jq -r '.number'
jq -r '.number'<<< "$canyonBuildJSON"
)
baseName=$(basename "${buildRelPath}")
@@ -51,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
fi
curl -fsSL -o "$SERVER" "$downloadUrl"
if [ ! -f "$SERVER" ]; then
log "ERROR: failed to download from $downloadUrl (status=$?)"
logError "Failed to download from $downloadUrl"
exit 3
fi
fi

View File

@@ -11,7 +11,7 @@ latestAsset=$(
)
if [[ -z "${latestAsset}" ]]; then
log "ERROR: latest release of Catserver is missing universal.jar asset"
logError "Latest release of Catserver is missing universal.jar asset"
exit 1
fi

View File

@@ -18,18 +18,18 @@ fi
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VERSION}-.*\.jar/)].browser_download_url" \
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible"
logError "Failed to access ${CRUCIBLE_RELEASE} release of Crucible"
exit 1
fi
if [[ $downloadUrl = null ]]; then
log "ERROR: failed to locate Crucible jar for $VERSION from ${CRUCIBLE_RELEASE}"
logError "Failed to locate Crucible jar for $VERSION from ${CRUCIBLE_RELEASE}"
exit 1
fi
log "Downloading Crucible from $downloadUrl"
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
log "ERROR: failed to download Crucible jar from $downloadUrl"
logError "Crucible jar from $downloadUrl"
exit 1
fi
@@ -37,18 +37,18 @@ librariesDir=/data/libraries
if [ ! -d "$librariesDir" ]; then
if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
logError "Failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
exit 1
fi
log "Downloading Crucible libraries"
if ! get -o /tmp/libraries.zip "$librariesUrl"; then
log "ERROR: failed to download Crucible libraries from $librariesUrl"
logError "Failed to download Crucible libraries from $librariesUrl"
exit 1
fi
if ! unzip /tmp/libraries.zip -d "$librariesDir"; then
log "ERROR: failed to unzip Crucible libraries"
logError "Failed to unzip Crucible libraries"
exit 1
fi
rm /tmp/libraries.zip

View File

@@ -41,4 +41,4 @@ fi
# Allow for overriding Family on custom for testing.
export FAMILY="${FAMILY:-HYBRID}"
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -1,6 +1,8 @@
#!/bin/bash
: "${FTB_FORCE_REINSTALL:=false}"
: "${FTB_BASE_URL:=https://api.feed-the-beast.com/v1/modpacks}"
# Legacy base URL was https://api.modpacks.ch
ftbInstallMarker=".ftb-installed"
@@ -9,72 +11,106 @@ ftbInstallMarker=".ftb-installed"
isDebugging && set -x
set -e
#
#{
# "id": 119,
# "name": "FTB Presents Direwolf20 1.20",
# "versionName": "1.16.0",
# "versionId": 12252,
# "modPackTargets": {
# "modLoader": {
# "name": "neoforge",
# "version": "47.1.84"
# },
# "javaVersion": "17.0.7+7",
# "mcVersion": "1.20.1"
# },
ftbManifest=.manifest.json
function getModLoaderName() {
jq -r ".modPackTargets.modLoader.name" ${ftbManifest}
}
function getModLoaderVersion() {
jq -r ".modPackTargets.modLoader.version" ${ftbManifest}
}
function getMinecraftVersion() {
jq -r ".modPackTargets.mcVersion" ${ftbManifest}
}
if [[ $(getDistro) = alpine ]]; then
log "ERROR: the FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
logError "The FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
exit 1
fi
if ! [[ -v FTB_MODPACK_ID ]]; then
log "ERROR FTB_MODPACK_ID is required with TYPE=FTB"
logError "FTB_MODPACK_ID is required with TYPE=FTB"
exit 1
fi
if ! [[ ${FTB_MODPACK_ID} =~ [0-9]+ ]]; then
log "ERROR FTB_MODPACK_ID needs to be numeric"
logError "FTB_MODPACK_ID needs to be numeric"
exit 1
fi
if [[ ! $FTB_MODPACK_VERSION_ID ]]; then
if ! FTB_MODPACK_VERSION_ID=$(curl -fsSL https://api.modpacks.ch/public/modpack/${FTB_MODPACK_ID} | jq -r '.versions | sort_by(.updated)[-1].id'); then
log "ERROR unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
if ! FTB_MODPACK_VERSION_ID=$(curl -fsSL "${FTB_BASE_URL}/public/modpack/${FTB_MODPACK_ID}" | jq -r '.versions | sort_by(.updated)[-1].id'); then
logError "Unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
exit 1
fi
elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
log "ERROR FTB_MODPACK_VERSION_ID needs to be numeric"
logError "FTB_MODPACK_VERSION_ID needs to be numeric"
exit 1
fi
if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
ftbInstaller=/data/ftb-installer
if isTrue "$FTB_FORCE_REINSTALL" ||
! [ -f "${ftbManifest}" ] ||
! [ -f "${ftbInstallMarker}" ] ||
[ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
ftbInstaller=/data/ftb-installer-v2
arm=
if ! [[ -f "${ftbInstaller}" ]]; then
log "Downloading FTB installer"
if [ "$(uname -m)" == "aarch64" ]; then
log "Downloading ARM installer"
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/arm/linux -o "${ftbInstaller}"
log "Downloading FTB installer for ARM"
arm="/arm"
else
log "Downloading x86 installer"
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
log "Downloading FTB installer for x86"
fi
# Example: https://api.feed-the-beast.com/v1/modpacks/public/modpack/119/12252/server/linux
# https://api.feed-the-beast.com/v1/modpacks/public/modpack/119/12252/server/arm/linux
# 1-1 is a placeholder modpack for just grabbing the installer
if ! get -o "${ftbInstaller}" "${FTB_BASE_URL}/public/modpack/1/1/server${arm}/linux"; then
logError "Failed to download FTB installer"
exit 1
fi
chmod +x "${ftbInstaller}"
fi
log "Installing modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
log "This could take a while..."
${ftbInstaller} "${FTB_MODPACK_ID}" "${FTB_MODPACK_VERSION_ID}" --noscript --auto > ftb-installer.log
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force | tee ftb-installer.log
rm -f forge*installer.jar
echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker}
writeEula
# some modpacks result in --w----r-- permissions
chmod a+r version.json
else
log "FTB modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID} is ready to go"
fi
forgeVersion=$(jq -r '.targets|unique[] | select(.name == "forge") | .version' version.json)
fabricVersion=$(jq -r '.targets|unique[] | select(.name == "fabric") | .version' version.json)
mcVersion=$(jq -r '.targets|unique[] | select(.name == "minecraft") | .version' version.json)
modLoader="$(getModLoaderName)"
modLoaderVersion="$(getModLoaderVersion)"
mcVersion=$(getMinecraftVersion)
VERSION="$mcVersion"
export VERSION
variants=(
"forge-${mcVersion}-${forgeVersion}.jar"
"forge-${mcVersion}-${forgeVersion}-universal.jar"
"forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar"
"fabric-${mcVersion}-${fabricVersion}-server-launch.jar"
run.sh
fabric-server-launch.jar
"${modLoader}-${mcVersion}-${modLoaderVersion}-universal.jar"
"${modLoader}-${mcVersion}-${modLoaderVersion}-${mcVersion}-universal.jar"
"${modLoader}-${mcVersion}-${modLoaderVersion}-server-launch.jar"
"${modLoader}-${mcVersion}-${modLoaderVersion}.jar"
)
for f in "${variants[@]}"; do
if [ -f $f ]; then
@@ -83,8 +119,8 @@ for f in "${variants[@]}"; do
fi
done
if ! [ -v SERVER ]; then
log "ERROR unable to locate the installed FTB server jar"
log " Tried looking for ${variants[*]}"
logError "Unable to locate the installed FTB server jar"
logError " Tried looking for ${variants[*]}"
exit 2
fi
@@ -100,7 +136,7 @@ if [[ $SERVER = run.sh ]]; then
export FAMILY=FABRIC
export TYPE=FABRIC
else
log "ERROR: unrecognized loader type in $SERVER"
logError "Unrecognized loader type in $SERVER"
cat "$SERVER"
exit 1
fi
@@ -112,7 +148,7 @@ elif [[ $SERVER = fabric* ]]; then
export FAMILY=FABRIC
export TYPE=FABRIC
else
log "ERROR: unrecognized loader type from $SERVER"
logError "Unrecognized loader type from $SERVER"
exit 1
fi

View File

@@ -16,40 +16,35 @@ isDebugging && set -x
# Custom fabric jar
if [[ $FABRIC_LAUNCHER ]]; then
if ! mc-image-helper install-fabric-loader \
if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \
--from-local-file="$FABRIC_LAUNCHER"; then
log "ERROR failed to use provided Fabric launcher"
logError "Failed to use provided Fabric launcher"
exit 1
fi
# Custom fabric jar url
elif [[ $FABRIC_LAUNCHER_URL ]]; then
if ! mc-image-helper install-fabric-loader \
if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \
--from-url="$FABRIC_LAUNCHER_URL"; then
log "ERROR failed to install Fabric launcher from $FABRIC_LAUNCHER_URL"
logError "Failed to installFabric launcher from $FABRIC_LAUNCHER_URL"
exit 1
fi
# Official fabric launcher
else
if ! mc-image-helper install-fabric-loader \
if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \
--minecraft-version="${VERSION}" \
--installer-version="${FABRIC_LAUNCHER_VERSION}" \
--loader-version="${FABRIC_LOADER_VERSION}"; then
log "ERROR failed to install Fabric launcher given $VERSION, $FABRIC_LAUNCHER_VERSION, $FABRIC_LOADER_VERSION"
logError "Failed to installFabric launcher given $VERSION, $FABRIC_LAUNCHER_VERSION, $FABRIC_LOADER_VERSION"
exit 1
fi
fi
# grab SERVER, etc and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
applyResultsFile ${resultsFile}
export FAMILY=FABRIC
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -6,36 +6,43 @@
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
isDebugging && set -x
resultsFile=/data/.run-forge.env
function mc-image-helper-forge() {
mc-image-helper install-forge \
--output-directory=/data \
--results-file="${resultsFile}" \
--minecraft-version="${VERSION}" \
--force-reinstall="${FORGE_FORCE_REINSTALL}" "$@"
}
if [[ ${FORGE_INSTALLER} ]]; then
if ! mc-image-helper install-forge \
--output-directory=/data \
--results-file=/data/.run-forge.env \
--minecraft-version="${VERSION}" \
--forge-installer="${FORGE_INSTALLER}" \
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
log "ERROR failed to install Forge given installer ${FORGE_INSTALLER}"
if ! mc-image-helper-forge --forge-installer="${FORGE_INSTALLER}" ; then
logError "Failed to installForge given installer ${FORGE_INSTALLER}"
exit 1
fi
elif [[ ${FORGE_INSTALLER_URL:-} ]]; then
mkdir -p tmp
if ! installer=$(get -o tmp --output-filename "${FORGE_INSTALLER_URL}"); then
logError "Failed to download installer from $FORGE_INSTALLER_URL"
exit 1
fi
# shellcheck disable=SC2064
trap "rm $installer" EXIT
if ! mc-image-helper-forge --forge-installer="${installer}" ; then
logError "Failed to install forge from ${FORGE_INSTALLER_URL}"
exit 1
fi
else
if ! mc-image-helper install-forge \
--output-directory=/data \
--results-file=/data/.run-forge.env \
--minecraft-version="${VERSION}" \
--forge-version="${FORGE_VERSION}" \
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
log "ERROR failed to install Forge"
if ! mc-image-helper-forge --forge-version="${FORGE_VERSION}"; then
logError "Failed to install Forge"
exit 1
fi
fi
# grab SERVER and export it
set -a
source /data/.run-forge.env
set +a
applyResultsFile ${resultsFile}
export FAMILY=FORGE

View File

@@ -9,7 +9,7 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \
--name-pattern="kettinglauncher-.+?(?<!-sources)\.jar" \
kettingpowered/kettinglauncher
); then
log "ERROR: failed to download Ketting launcher"
logError "Failed to download Ketting launcher"
exit 1
fi
@@ -17,12 +17,12 @@ export SERVER
resolveVersion
EXTRA_ARGS+="-minecraftVersion $VERSION"
EXTRA_ARGS+=" -minecraftVersion $VERSION"
if [[ ${KETTING_VERSION:-} ]]; then
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
EXTRA_ARGS+=" -kettingVersion $KETTING_VERSION"
fi
if [[ ${FORGE_VERSION:-} ]]; then
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
EXTRA_ARGS+=" -forgeVersion $FORGE_VERSION"
fi
export EXTRA_ARGS

View File

@@ -22,7 +22,7 @@ baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
buildInfoUrl="${baseUrl}/api/json"
buildJson=$(curl -fsSL "${buildInfoUrl}")
if [ $? != 0 ]; then
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
logError "Failed to get build info from ${buildInfoUrl} (status=$?)"
exit 1
fi
@@ -30,8 +30,14 @@ if [[ ${LIMBO_BUILD} = lastStableBuild ]]; then
LIMBO_BUILD=$(jq -r '.number' <<<${buildJson})
log "Resolved latest Limbo build to ${LIMBO_BUILD}"
fi
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
getRelativePath() {
local pattern=$1
jq -r --arg pattern "$pattern" '.artifacts[] | select(.fileName|test($pattern)) | .relativePath' <<<${buildJson}
}
artifactPath=$(getRelativePath "^Limbo-")
defaultSchemaPath=$(getRelativePath ".*\\.schem")
export SERVER="limbo-${LIMBO_BUILD}.jar"
@@ -39,7 +45,7 @@ if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
downloadUrl="${baseUrl}/artifact/${artifactPath}"
log "Downloading Limbo from $downloadUrl ..."
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
log "ERROR: failed to download from $downloadUrl (status=$?)"
logError "Failed to download from $downloadUrl (status=$?)"
exit 3
fi
@@ -48,7 +54,7 @@ fi
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
log "Downloading default schem file"
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
log "ERROR: failed to download schema file $baseUrl (status=$?)"
logError "Failed to download schema file $baseUrl (status=$?)"
exit 3
fi
fi

View File

@@ -9,17 +9,17 @@ isDebugging && set -x
resolveVersion
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VERSION}/latest/${MAGMA_VERSION}"); then
log "ERROR failed to locate latest Magma download for ${VERSION}. Is that version supported?"
logError "Failed to locate latest Magma download for ${VERSION}. Is that version supported?"
exit 1
fi
if [[ $downloadUrl == null ]]; then
log "ERROR Magma does not seem to be available for $VERSION"
logError "Magma does not seem to be available for $VERSION"
exit 1
fi
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
log "ERROR: failed to download Magma server jar from $downloadUrl"
logError "Failed to download Magma server jar from $downloadUrl"
exit 1
fi

View File

@@ -10,7 +10,7 @@ isDebugging && set -x
resolveVersion
if [ -z $MAGMA_MAINTAINED_TAG ]; then
log "ERROR the variable MAGMA_MAINTAINED_TAG is not specified"
logError "The variable MAGMA_MAINTAINED_TAG is not specified"
exit 1
fi
@@ -20,7 +20,7 @@ if [[ ${VERSION} = "1.12.2" ]]; then
fileName="Magma-${VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
else
if [ -z $FORGE_VERSION ]; then
log "ERROR the variable FORGE_VERSION is not specified"
logError "The variable FORGE_VERSION is not specified"
exit 1
fi
fileName="magma-${VERSION}-${FORGE_VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
@@ -28,7 +28,7 @@ fi
downloadUrl="https://github.com/magmamaintained/Magma-${VERSION}/releases/download/${MAGMA_MAINTAINED_TAG}/${fileName}"
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
log "ERROR: failed to download Magma Maintained server jar from $downloadUrl"
logError "Failed to download Magma Maintained server jar from $downloadUrl"
exit 1
fi

View File

@@ -16,13 +16,13 @@ resultsFile=/data/.install-modrinth.env
: "${MODRINTH_DEFAULT_EXCLUDE_INCLUDES=/image/modrinth-exclude-include.json}"
if [[ ! $MODRINTH_MODPACK ]]; then
log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
logError "MODRINTH_MODPACK must be set when using TYPE/MODPACK_PLATFORM/MOD_PLATFORM of MODRINTH"
exit 1
fi
isDebugging && set -x
ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"
ensureRemoveAllModsOff "MODPACK_PLATFORM=MODRINTH"
args=(
--results-file="$resultsFile"
@@ -64,15 +64,11 @@ setArg --overrides-exclusions MODRINTH_OVERRIDES_EXCLUSIONS
setArg --default-exclude-includes MODRINTH_DEFAULT_EXCLUDE_INCLUDES
if ! mc-image-helper install-modrinth-modpack "${args[@]}"; then
log "ERROR failed to install Modrinth modpack"
logError "Failed to installModrinth modpack"
exit 1
fi
# grab SERVER, TYPE, VERSION and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
applyResultsFile ${resultsFile}
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -9,35 +9,46 @@ isDebugging && set -x
resolveVersion
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
mohistJobs=https://ci.codemc.io/job/MohistMC/job/
mohistJob=${mohistJobs}Mohist-${VERSION}/
mohistBaseUrl="https://mohistmc.com/api/v2/projects/mohist/"
mohistApiUrl="${mohistBaseUrl}${VERSION}/builds/"
if ! get --exists "${mohistJob}"; then
log "ERROR: mohist builds do not exist for ${VERSION}"
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
log " and set VERSION accordingly"
function logMohistAvailableVerisons(){
logError " check ${mohistBaseUrl} for available versions"
logError " and set VERSION accordingly"
}
if ! get --exists "${mohistApiUrl}"; then
logError "Mohist builds do not exist for ${VERSION}"
logMohistAvailableVerisons
exit 1
fi
buildRelPath=$(
get --json-path '$.artifacts[0].relativePath' "${mohistJob}${MOHIST_BUILD}/api/json"
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
# Get the latest build number from the API
buildNumber=$(
get --json-path '$.builds[-1].number' "${mohistApiUrl}"
)
MOHIST_BUILD="${buildNumber}"
fi
downloadUrl=$(
get --json-path "$.builds[?(@.number==${MOHIST_BUILD})].url" "${mohistApiUrl}"
)
baseName=$(basename "${buildRelPath}")
if [[ ${baseName} != *-server.jar* ]]; then
log "ERROR: mohist build for ${VERSION} is not a valid server jar, found ${baseName}"
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
log " and set VERSION accordingly"
if [[ -z "${downloadUrl}" ]]; then
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
logMohistAvailableVerisons
exit 1
fi
export SERVER="/data/${baseName}"
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
if [ ! -f "${SERVER}" ]; then
log "Downloading ${baseName}"
get -o "${SERVER}" "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
get -o "${SERVER}" "${downloadUrl}"
fi
export FAMILY=HYBRID
export SERVER
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -15,15 +15,11 @@ if ! mc-image-helper install-neoforge \
--minecraft-version="${VERSION}" \
--neoforge-version="${NEOFORGE_VERSION}" \
--force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
log "ERROR failed to install Forge"
logError "Failed to install NeoForge"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source ${resultsFile}
set +a
applyResultsFile ${resultsFile}
export FAMILY=FORGE

View File

@@ -20,15 +20,10 @@ elif [[ $PAPER_DOWNLOAD_URL ]]; then
--output-directory=/data \
--results-file="$resultsFile" \
--url="$PAPER_DOWNLOAD_URL"; then
log "ERROR: failed to download from custom PaperMC URL"
logError "Failed to download from custom PaperMC URL"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
applyResultsFile ${resultsFile}
else
args=(
--output-directory=/data
@@ -41,22 +36,24 @@ else
args+=(--build="$PAPER_BUILD")
fi
if ! mc-image-helper install-paper "${args[@]}"; then
log "ERROR: failed to download $PAPER_PROJECT"
logError "Failed to download $PAPER_PROJECT"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
applyResultsFile ${resultsFile}
fi
# Download default configs to allow for consistent patching
for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
DOWNLOAD_DEFAULT_CONFIGS+=",${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/$c"
done
export DOWNLOAD_DEFAULT_CONFIGS
defaultTopLevelConfigs="bukkit.yml spigot.yml"
if versionLessThan 1.19; then
defaultTopLevelConfigs+=" paper.yml"
else
# Download default configs to allow for consistent patching
DOWNLOAD_DEFAULT_CONFIGS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" paper-global.yml paper-world-defaults.yml)
export DOWNLOAD_DEFAULT_CONFIGS
fi
# Download top-level configs to allow for consistent patching
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" $defaultTopLevelConfigs)
export DOWNLOAD_DEFAULTS
# Normalize on Spigot for downstream operations
export FAMILY=SPIGOT

View File

@@ -9,7 +9,7 @@ isDebugging && set -x
IFS=$'\n\t'
if versionLessThan 1.17; then
log "ERROR: Pufferfish server type only supports versions 1.17, 1.18 or 1.19, use PUFFERFISH_BUILD to select the the correct build 47 => 1.18.1, 50 => 1.18.2 etc"
logError "Pufferfish server type only supports versions 1.17, 1.18 or 1.19, use PUFFERFISH_BUILD to select the the correct build 47 => 1.18.1, 50 => 1.18.2 etc"
exit 1
fi
@@ -35,7 +35,7 @@ done
if [[ ! -f "$SERVER" ]] || isTrue "${FORCE_REDOWNLOAD:-false}"; then
log "Downloading Pufferfish from $PUFFERFISH_BUILD_DOWNLOAD_URL ..."
if ! get -o "$SERVER" "$PUFFERFISH_BUILD_DOWNLOAD_URL"; then
log "ERROR: failed to download from $PUFFERFISH_BUILD_DOWNLOAD_URL (status=$?)"
logError "Failed to download from $PUFFERFISH_BUILD_DOWNLOAD_URL (status=$?)"
exit 3
fi
fi

View File

@@ -15,16 +15,10 @@ if [[ $PURPUR_DOWNLOAD_URL ]]; then
if ! mc-image-helper install-purpur \
--output-directory=/data \
--results-file="$resultsFile" \
--url="$PURPUR_DOWNLOAD_URL}"; then
log "ERROR: failed to download from custom Purpur URL"
--url="${PURPUR_DOWNLOAD_URL}"; then
logError "Failed to download from custom Purpur URL"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
else
args=(
--output-directory=/data
@@ -35,16 +29,13 @@ else
args+=(--build="$PURPUR_BUILD")
fi
if ! mc-image-helper install-purpur "${args[@]}"; then
log "ERROR: failed to download Purpur"
logError "Failed to download Purpur"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
fi
applyResultsFile ${resultsFile}
# Normalize on Spigot for later operations
export FAMILY=SPIGOT

View File

@@ -12,10 +12,18 @@ set -eu
isDebugging && set -x
function mc-image-helper-quilt(){
mc-image-helper install-quilt \
--loader-version="$QUILT_LOADER_VERSION" \
--minecraft-version="$VERSION" \
--output-directory=/data \
--results-file="$resultsFile" "$@"
}
resultsFile=/data/.quilt.env
if [[ $QUILT_LAUNCHER ]]; then
log "WARNING: use of QUILT_LAUNCHER is a deprecated feature."
logWarning "Use of QUILT_LAUNCHER is a deprecated feature."
SERVER="$QUILT_LAUNCHER"
export SERVER
resolveVersion
@@ -24,38 +32,24 @@ if [[ $QUILT_LAUNCHER ]]; then
exec "${SCRIPTS:-/}start-setupWorld" "$@"
elif [[ $QUILT_LAUNCHER_URL ]]; then
log "ERROR: QUILT_LAUNCHER_URL is not longer supported. Pre-download and use QUILT_LAUNCHER."
logError "QUILT_LAUNCHER_URL is not longer supported. Pre-download and use QUILT_LAUNCHER."
exit 2
elif [[ $QUILT_INSTALLER_URL ]]; then
if ! mc-image-helper install-quilt \
--loader-version="$QUILT_LOADER_VERSION" \
--minecraft-version="$VERSION" \
--output-directory=/data \
--results-file="$resultsFile" \
--installer-url="$QUILT_INSTALLER_URL"; then
log "ERROR: failed to install Quilt given custom installer URL $QUILT_INSTALLER_URL"
if ! mc-image-helper-quilt --installer-url="$QUILT_INSTALLER_URL"; then
logError "Failed to installQuilt given custom installer URL $QUILT_INSTALLER_URL"
exit 2
fi
else
if ! mc-image-helper install-quilt \
--loader-version="$QUILT_LOADER_VERSION" \
--minecraft-version="$VERSION" \
--output-directory=/data \
--results-file="$resultsFile" \
--installer-version="$QUILT_INSTALLER_VERSION"; then
log "ERROR: failed to install Quilt given installer version $QUILT_INSTALLER_VERSION"
if ! mc-image-helper-quilt --installer-version="$QUILT_INSTALLER_VERSION"; then
logError "Failed to installQuilt given installer version $QUILT_INSTALLER_VERSION"
exit 2
fi
fi
# grab SERVER, VERSION and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
applyResultsFile ${resultsFile}
export FAMILY=FABRIC
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -24,11 +24,7 @@ esac
# If not SPONGEVERSION selected, detect last version on selected branch
if [ -z $SPONGEVERSION ]; then
log "Choosing Version for Sponge"
if [ "$SPONGEBRANCH" == "stable" ]; then
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r '.buildTypes.stable.latest.version')
else
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r '.buildTypes.bleeding.latest.version')
fi
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r --arg SPONGEBRANCH "$SPONGEBRANCH" '.buildTypes.$SPONGEBRANCH.latest.version')
fi
VERSION="$SPONGEVERSION"

View File

@@ -13,20 +13,20 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
versionManifestUrl=$(get 'https://launchermeta.mojang.com/mc/game/version_manifest.json' | jq --arg VERSION "$VERSION" --raw-output '[.versions[]|select(.id == $VERSION)][0].url')
result=$?
if [ $result != 0 ]; then
log "ERROR: failed to obtain version manifest URL ($result)"
logError "Failed to obtain version manifest URL ($result)"
exit 1
fi
if [ "$versionManifestUrl" = "null" ]; then
log "ERROR: couldn't find a matching manifest entry for $VERSION"
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
log "ERROR: failed to obtain version manifest from $versionManifestUrl ($result)"
logError "Failed to obtain version manifest from $versionManifestUrl ($result)"
exit 1
elif [ "$serverDownloadUrl" = "null" ]; then
log "ERROR: there is not a server download for version $VERSION"
logError "There is not a server download for version $VERSION"
exit 1
fi
@@ -35,19 +35,20 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
get -o "$SERVER" "$serverDownloadUrl"
result=$?
if [ $result != 0 ]; then
log "ERROR: failed to download server from $serverDownloadUrl ($result)"
logError "Failed to download server from $serverDownloadUrl ($result)"
exit 1
fi
fi
minecraftServerJarPath=/data/minecraft_server.jar
if versionLessThan 1.6; then
if ! [[ -L /data/minecraft_server.jar && /data/minecraft_server.jar -ef "/data/$SERVER" ]]; then
rm -f /data/minecraft_server.jar
ln -s "/data/$SERVER" /data/minecraft_server.jar
if ! [[ -L $minecraftServerJarPath && $minecraftServerJarPath -ef "/data/$SERVER" ]]; then
rm -f $minecraftServerJarPath
ln -s "/data/$SERVER" $minecraftServerJarPath
fi
SERVER=minecraft_server.jar
elif [[ -L /data/minecraft_server.jar ]]; then
rm -f /data/minecraft_server.jar
elif [[ -L $minecraftServerJarPath ]]; then
rm -f $minecraftServerJarPath
fi
isDebugging && ls -l

View File

@@ -7,37 +7,42 @@
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
baseDataDir=/data
tmpServerIconPath=/tmp/icon.img
serverIconPath=${baseDataDir}/server-icon.png
mcHealthEnvPath=${baseDataDir}/.mc-health.env
bootstrapPath=${baseDataDir}/bootstrap.txt
if [ -n "$ICON" ]; then
if [ ! -e server-icon.png ] || isTrue "${OVERRIDE_ICON}"; then
log "Using server icon from $ICON..."
if isURL "$ICON"; then
# Not sure what it is yet...call it "img"
if ! get -o /tmp/icon.img "$ICON"; then
log "ERROR: failed to download icon from $ICON"
if ! get -o "$tmpServerIconPath" "$ICON"; then
logError "Failed to download icon from $ICON"
exit 1
fi
ICON=/tmp/icon.img
ICON="$tmpServerIconPath"
iconSrc="url"
elif [ -f "$ICON" ]; then
iconSrc="file"
else
log "ERROR: $ICON does not appear to be a URL or existing file"
logError "$ICON does not appear to be a URL or existing file"
exit 1
fi
read -r -a specs < <(identify "$ICON" | awk 'NR == 1 { print $2, $3 }')
if [ "${specs[0]} ${specs[1]}" = "PNG 64x64" ]; then
if [ $iconSrc = url ]; then
mv -f /tmp/icon.img /data/server-icon.png
mv -f "$tmpServerIconPath" "$serverIconPath"
else
cp -f "$ICON" /data/server-icon.png
cp -f "$ICON" "$serverIconPath"
fi
elif [ "${specs[0]}" = GIF ]; then
log "Converting GIF image to 64x64 PNG..."
convert "$ICON"[0] -resize 64x64! /data/server-icon.png
convert "$ICON"[0] -resize 64x64! "$serverIconPath"
else
log "Converting image to 64x64 PNG..."
convert "$ICON" -resize 64x64! /data/server-icon.png
convert "$ICON" -resize 64x64! "$serverIconPath"
fi
fi
fi
@@ -45,10 +50,9 @@ fi
canUseRollingLogs=true
useFallbackJvmFlag=false
SERVER_DIR="$baseDataDir"
if [[ ${FTB_DIR:-} ]]; then
SERVER_DIR="$FTB_DIR"
else
SERVER_DIR=/data
fi
@@ -56,7 +60,7 @@ patchLog4jConfig() {
file=${1?}
url=${2?}
if ! get -o "${SERVER_DIR}/${file}" "$url"; then
log "ERROR: failed to download corrected log4j config, fallback to JVM flag"
logError "Failed to download corrected log4j config, fallback to JVM flag"
useFallbackJvmFlag=true
return 1
fi
@@ -101,7 +105,7 @@ fi
if isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
if ! ${canUseRollingLogs}; then
log "ERROR: Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
logError "Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
exit 1
fi
# Set up log configuration
@@ -214,31 +218,31 @@ if [[ ${INIT_MEMORY} || ${MAX_MEMORY} ]]; then
fi
function copyFilesForCurseForge() {
if [ ! -e "${FTB_DIR}/server-icon.png" ] && [ -e /data/server-icon.png ]; then
cp -f /data/server-icon.png "${FTB_DIR}/"
if [ ! -e "${FTB_DIR}/server-icon.png" ] && [ -e "$serverIconPath" ]; then
cp -f "$serverIconPath" "${FTB_DIR}/"
fi
cp -f /data/eula.txt "${FTB_DIR}/"
cp -f ${baseDataDir}/eula.txt "${FTB_DIR}/"
}
if versionLessThan 'b1.8'; then
echo "
DISABLE_HEALTHCHECK=true
" > /data/.mc-health.env
" > "$mcHealthEnvPath"
elif versionLessThan 1.7; then
echo "
MC_HEALTH_EXTRA_ARGS=(
--use-server-list-ping
)
" > /data/.mc-health.env
" > "$mcHealthEnvPath"
elif isTrue "$USES_PROXY_PROTOCOL"; then
echo "
MC_HEALTH_EXTRA_ARGS=(
--use-proxy
)
" > /data/.mc-health.env
" > "$mcHealthEnvPath"
else
rm -f /data/.mc-health.env
rm -f "$mcHealthEnvPath"
fi
mcServerRunnerArgs=(
@@ -257,7 +261,7 @@ fi
if [[ ${TYPE} == "CURSEFORGE" && "${SERVER}" ]]; then
copyFilesForCurseForge
cd "${FTB_DIR}" || (log "ERROR: can't go into ${FTB_DIR}"; exit 1)
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
log "Starting CurseForge server in ${FTB_DIR}..."
if isTrue "${DEBUG_EXEC}"; then
set -x
@@ -279,7 +283,7 @@ EOF
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg"
fi
cd "${FTB_DIR}" || (log "ERROR: can't go into ${FTB_DIR}"; exit 1)
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."
finalArgs="${FTB_SERVER_START}"
@@ -315,8 +319,8 @@ elif [[ $SERVER =~ run.sh ]]; then
exec mc-server-runner "${mcServerRunnerArgs[@]}" --shell bash "${SERVER}" $EXTRA_ARGS
else
# If we have a bootstrap.txt file... feed that in to the server stdin
if [ -f /data/bootstrap.txt ]; then
bootstrapArgs="--bootstrap /data/bootstrap.txt"
if [ -f $bootstrapPath ]; then
bootstrapArgs="--bootstrap $bootstrapPath"
fi
log "Starting the Minecraft server..."

View File

@@ -22,15 +22,7 @@ log "Rcon cmds functionality enabled"
isDebugging && set -x
if ! [[ $RCON_CMDS_PERIOD =~ ^[0-9]+$ ]]; then
RCON_CMDS_PERIOD=10
export RCON_CMDS_PERIOD
log "Warning: RCON_CMDS_PERIOD is not numeric, set to 10 (seconds)"
fi
if [ "$RCON_CMDS_PERIOD" -eq "0" ] ; then
RCON_CMDS_PERIOD=10
export RCON_CMDS_PERIOD
log "Warning: RCON_CMDS_PERIOD must not be 0, set to 10 (seconds)"
fi
isNumericElseSetToDefault RCON_CMDS_PERIOD 10
checkIfNotZeroElseSetToDefault RCON_CMDS_PERIOD 10
/usr/local/bin/rcon-cmds-daemon.sh &

View File

@@ -30,28 +30,33 @@ if [[ "$DATAPACKS" ]]; then
if isURL "$i"; then
log "Downloading datapack $i ..."
if ! get -o "${out_dir}" "$i"; then
log "ERROR: failed to download from $i into $out_dir"
logError "Failed to download from $i into $out_dir"
exit 2
fi
elif [[ -f "$i" && "$i" =~ .*\.zip ]]; then
log "Copying datapack located at $i ..."
out_file=$(basename "$i")
if ! cp "$i" "${out_dir}/$out_file"; then
log "ERROR: failed to copy from $i into $out_dir"
logError "Failed to copy from $i into $out_dir"
exit 2
fi
elif [[ -d "$i" ]]; then
log "Copying datapacks from $i ..."
cp "$i"/*.zip "${out_dir}"
if [[ -f "$i/pack.mcmeta" ]]; then
log "Copying datapack from $i"
cp -r "$i" "${out_dir}"
else
log "Copying datapacks from $i ..."
cp "$i"/*.zip "${out_dir}"
fi
else
log "ERROR Invalid URL or path given in DATAPACKS: $i"
logError "Invalid URL or path given in DATAPACKS: $i"
exit 2
fi
done
elif [[ "$DATAPACKS_FILE" ]]; then
if [ ! -f "$DATAPACKS_FILE" ]; then
log "ERROR: given DATAPACKS_FILE file does not exist"
logError "Given DATAPACKS_FILE file does not exist"
exit 2
fi
@@ -71,7 +76,7 @@ elif [[ "$DATAPACKS_FILE" ]]; then
fi
if ! get "${args[@]}" ; then
log "ERROR: failed to retrieve one or more datapacks"
logError "Failed to retrieve one or more datapacks"
exit 1
fi
fi

View File

@@ -33,7 +33,16 @@ if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
--to /data/config \
--skip-existing --skip-up-to-date=false \
"$DOWNLOAD_DEFAULT_CONFIGS" 2> /dev/null; then
log "WARN: one or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
fi
fi
if [[ $DOWNLOAD_DEFAULTS ]]; then
log "Downloading default top-level configs, if needed"
if ! mc-image-helper mcopy \
--to /data \
--skip-existing --skip-up-to-date=false \
"$DOWNLOAD_DEFAULTS" 2> /dev/null; then
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
fi
fi

View File

@@ -34,13 +34,13 @@ function handlePackwiz() {
--maven-repo=https://maven.packwiz.infra.link/repository/release/ \
--group=link.infra.packwiz --artifact=packwiz-installer --classifier=dist \
--skip-existing); then
log "ERROR: failed to get packwiz installer"
logError "Failed to get packwiz installer"
exit 1
fi
log "Running packwiz installer against URL: ${PACKWIZ_URL}"
if ! java -cp "${packwizInstaller}" link.infra.packwiz.installer.Main -s server "${PACKWIZ_URL}"; then
log "ERROR failed to run packwiz installer"
logError "Failed to run packwiz installer"
exit 1
fi
fi
@@ -52,28 +52,28 @@ if [[ "$MODPACK" ]]; then
if isURL "${MODPACK}"; then
log "Downloading mod/plugin pack"
if ! get -o /tmp/modpack.zip "${MODPACK}"; then
log "ERROR: failed to download from ${MODPACK}"
logError "Failed to download from ${MODPACK}"
exit 2
fi
elif [[ "$MODPACK" =~ .*\.zip ]]; then
if ! cp "$MODPACK" /tmp/modpack.zip; then
log "ERROR: failed to copy from $MODPACK"
logError "Failed to copy from $MODPACK"
exit 2
fi
else
log "ERROR Invalid URL or Path given for MODPACK: $MODPACK"
logError "Invalid URL or Path given for MODPACK: $MODPACK"
exit 1
fi
if [ "$FAMILY" = "SPIGOT" ]; then
mkdir -p "$PLUGINS_OUT_DIR"
if ! unzip -o -d "$PLUGINS_OUT_DIR" /tmp/modpack.zip; then
log "ERROR: failed to unzip the modpack from ${MODPACK}"
logError "Failed to unzip the modpack from ${MODPACK}"
fi
else
mkdir -p "$MODS_OUT_DIR"
if ! unzip -o -d "$MODS_OUT_DIR" /tmp/modpack.zip; then
log "ERROR: failed to unzip the modpack from ${MODPACK}"
logError "Failed to unzip the modpack from ${MODPACK}"
fi
fi
rm -f /tmp/modpack.zip
@@ -155,6 +155,7 @@ function handleGenericPacks() {
: "${GENERIC_PACKS:=${GENERIC_PACK}}"
: "${GENERIC_PACKS_PREFIX:=}"
: "${GENERIC_PACKS_SUFFIX:=}"
: "${GENERIC_PACKS_DISABLE_MODS:=}"
if [[ "${GENERIC_PACKS}" ]]; then
IFS=',' read -ra packs <<< "${GENERIC_PACKS}"
@@ -166,7 +167,7 @@ function handleGenericPacks() {
mkdir -p /data/packs
log "Downloading generic pack from $pack"
if ! outfile=$(get -o /data/packs --output-filename --skip-up-to-date "$pack"); then
log "ERROR: failed to download $pack"
logError "Failed to download $pack"
exit 2
fi
packFiles+=("$outfile")
@@ -192,6 +193,12 @@ function handleGenericPacks() {
extract "${pack}" "${base_dir}"
done
# Disable mods
for mod in ${GENERIC_PACKS_DISABLE_MODS}; do
log Disabling $mod
find "${base_dir}" -name "$mod" -exec mv {} {}.disabled -v \;
done
# Remove any eula file since container manages it
rm -f "${base_dir}/eula.txt"
@@ -200,7 +207,7 @@ function handleGenericPacks() {
--max-depth=3 --type=directory --name=mods,plugins,config \
--only-shallowest --fail-no-matches --format '%h' \
"$base_dir"); then
log "ERROR: Unable to find content base of generic packs ${GENERIC_PACKS}. Directories:"
logError "Unable to find content base of generic packs ${GENERIC_PACKS}. Directories:"
mc-image-helper find --name=* --max-depth=3 --type=directory --format '- %P' "$original_base_dir"
exit 1
fi
@@ -240,8 +247,8 @@ function handleModrinthProjects() {
: "${MODRINTH_ALLOWED_VERSION_TYPE:=release}"
: "${MODRINTH_DOWNLOAD_DEPENDENCIES:=none}"
if [[ -v MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES ]]; then
log "WARNING The variable MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES is removed."
log " Use MODRINTH_DOWNLOAD_DEPENDENCIES=optional instead"
logWarning "The variable MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES is removed."
logWarning " Use MODRINTH_DOWNLOAD_DEPENDENCIES=optional instead"
fi
if [[ $MODRINTH_PROJECTS ]]; then
@@ -272,7 +279,7 @@ function handleCurseForgeFiles() {
fi
case "${TYPE,,}" in
forge|fabric|quilt)
forge|neoforge|fabric|quilt)
args+=(--mod-loader "$TYPE")
;;
*)
@@ -298,14 +305,14 @@ handleModpackZip
handleListings
if [[ $MANIFEST ]]; then
log "ERROR: MANIFEST is no longer supported."
log " Use MOD_PLATFORM=AUTO_CURSEFORGE and CF_MODPACK_MANIFEST instead"
logError "MANIFEST is no longer supported."
logError " Use MODPACK_PLATFORM=AUTO_CURSEFORGE and CF_MODPACK_MANIFEST instead"
exit 1
fi
if [[ $MODS_FORGEAPI_KEY || $MODS_FORGEAPI_FILE || $MODS_FORGEAPI_PROJECTIDS ]]; then
log "ERROR the MODS_FORGEAPI_FILE / MODS_FORGEAPI_PROJECTIDS feature is no longer supported"
log " Use CURSEFORGE_FILES instead."
logError "The MODS_FORGEAPI_FILE / MODS_FORGEAPI_PROJECTIDS feature is no longer supported"
logError " Use CURSEFORGE_FILES instead."
exit 1
fi

Some files were not shown because too many files have changed in this diff Show More