Compare commits

..

120 Commits

Author SHA1 Message Date
Geoff Bourne 88e5b7e135 Auto-merging via docker-versions-create 2021-12-13 21:28:30 -06:00
itzg 39611fa9cb docs: Auto update markdown TOC 2021-12-14 02:14:33 +00:00
Jawa_Juice bb56de694a Remove Airplane 1.16 as unsupported (#1199) 2021-12-13 20:14:16 -06:00
woeisme c4d4d2bcc1 Created new template for docker-compose-paper.yml (#1198) 2021-12-13 14:25:21 -06:00
Levy Ehrstein 4e44f33db9 fix: fabric downgrading not working (#1197, #1192)
See #1192 for an in-depth explanation of the problem.

Reported-by: Erik "Coding-Kiwi"
2021-12-13 13:50:20 -06:00
dependabot[bot] 58c085527f build(deps): bump actions/stale from 4.0.0 to 4.1.0 (#1196) 2021-12-13 07:45:16 -06:00
itzg 79fa4b95c3 docs: Auto update markdown TOC 2021-12-13 02:08:27 +00:00
Geoff Bourne d5f1660c77 docs: Removed docker-compose-paper.yml since it was out of date (#1195) 2021-12-12 20:08:13 -06:00
Geoff Bourne 86190eafc7 Auto-merging via docker-versions-create 2021-12-12 19:51:45 -06:00
Geoff Bourne 6729ba462e Merge branch 'master' of github.com:itzg/docker-minecraft-server 2021-12-12 15:35:14 -06:00
Geoff Bourne 3a3b5fc002 fix: qualify Fabric server jar by installer version (#1193) 2021-12-12 15:34:24 -06:00
Geoff Bourne 4b28d5e472 fix: qualify Fabric server jar by installer version
Fixes #1191
2021-12-12 15:28:30 -06:00
Geoff Bourne 7983a4a3a2 Merging latest from master 2021-12-12 09:15:05 -06:00
Levy Ehrstein eccc989887 secruity: Fix CVE-2021-44228 mitigation (#1190) 2021-12-12 08:19:16 -06:00
Brett Randall c4aa105042 Added --chmod to all COPY instructions in Dockerfile (#1184) 2021-12-12 08:10:18 -06:00
Geoff Bourne ffcb76f73f build: auto-create github release when docker-versions-create with tag (#1188) 2021-12-11 16:51:01 -06:00
Geoff Bourne 52ac180c77 Auto-merging via docker-versions-create 2021-12-11 16:24:32 -06:00
Geoff Bourne 32195e71c5 Auto-merging via docker-versions-create 2021-12-10 21:04:32 -06:00
Geoff Bourne a0a578f452 Auto-merging via docker-versions-create 2021-12-10 10:42:16 -06:00
Geoff Bourne ca0ddc80aa Auto-merging via docker-versions-create 2021-12-10 07:57:27 -06:00
Geoff Bourne 1a625f09bb Auto-merging via docker-versions-create 2021-12-06 22:05:02 -06:00
Geoff Bourne 9ab345a727 Auto-merging via docker-versions-create 2021-12-04 10:00:12 -06:00
Geoff Bourne 4e3031cff8 Auto-merging via docker-versions-create 2021-12-02 19:46:55 -06:00
Geoff Bourne 466e1728f6 Auto-merging via docker-versions-create 2021-11-24 15:57:45 -06:00
Geoff Bourne 8dddbc4120 Auto-merging via docker-versions-create 2021-11-24 14:34:30 -06:00
Geoff Bourne 53e9d36a05 Track latest from master 2021-11-16 19:02:30 -06:00
Geoff Bourne 275c2d0c54 Auto-merging via docker-versions-create 2021-11-16 18:52:01 -06:00
Geoff Bourne cf9c40f331 Auto-merging via docker-versions-create 2021-11-15 20:48:30 -06:00
Geoff Bourne 491ffe49bf Auto-merging via docker-versions-create 2021-11-13 19:18:03 -06:00
Geoff Bourne d4a9b367c7 Auto-merging via docker-versions-create 2021-11-13 18:52:36 -06:00
Geoff Bourne 032d94a30f Auto-merging via docker-versions-create 2021-11-12 21:24:26 -06:00
Geoff Bourne 3784d2df54 Auto-merging via docker-versions-create 2021-11-06 21:38:11 -05:00
Geoff Bourne 8a36823843 Auto-merging via docker-versions-create 2021-11-04 21:04:41 -05:00
Geoff Bourne 78c520572a Auto-merging via docker-versions-create 2021-10-31 09:46:11 -05:00
Geoff Bourne 5303105265 Switched base image to JDK
#1064
2021-10-27 21:25:24 -05:00
Geoff Bourne 1f120c5fa4 Auto-merging via docker-versions-create 2021-10-25 19:23:56 -05:00
Geoff Bourne 70ec3b838d Auto-merging via docker-versions-create 2021-10-24 20:28:03 -05:00
Geoff Bourne b248ed342f Auto-merging via docker-versions-create 2021-10-23 09:43:19 -05:00
Geoff Bourne 4c70184804 Merged latest from master 2021-10-22 15:53:10 -05:00
Geoff Bourne b9ba062add Auto-merged latest from master 2021-10-18 22:13:11 -05:00
Geoff Bourne cbb1d0ea52 Added support for Crucible server type
#1052
2021-10-18 22:02:23 -05:00
Geoff Bourne bbad3a3e7a Auto-merging via docker-versions-create 2021-10-17 14:53:04 -05:00
Geoff Bourne 8965397a5a Auto-merging via docker-versions-create 2021-10-15 18:57:28 -05:00
Geoff Bourne c661fe7318 Auto-merging via docker-versions-create 2021-10-15 18:47:46 -05:00
Geoff Bourne bae1feb750 Auto-merging via docker-versions-create 2021-10-10 09:56:39 -05:00
Geoff Bourne edbcf80a70 Auto-merging via docker-versions-create 2021-10-09 15:25:44 -05:00
Geoff Bourne fb23e12680 Auto-merging via docker-versions-create 2021-10-09 12:04:28 -05:00
Geoff Bourne e30a2e6448 Auto-merging via docker-versions-create 2021-10-02 19:22:34 -05:00
Geoff Bourne 03d7babd68 Auto-merging via docker-versions-create 2021-09-29 10:26:54 -05:00
Geoff Bourne 332b929a6d Auto-merging via docker-versions-create 2021-09-27 20:41:23 -05:00
Geoff Bourne c138cabc65 Auto-merging via docker-versions-create 2021-09-20 12:30:46 -05:00
Geoff Bourne 41631e35e8 Auto-merging via docker-versions-create 2021-09-15 21:31:13 -05:00
Geoff Bourne 6f95fa6175 Auto-merging via docker-versions-create 2021-09-15 21:06:58 -05:00
Geoff Bourne 6f16da8309 Auto-merging via docker-versions-create 2021-09-15 20:37:01 -05:00
Geoff Bourne 8cee8d5618 Auto-merging via docker-versions-create 2021-08-30 21:37:26 -05:00
Geoff Bourne 8b76b5776a Auto-merging via docker-versions-create 2021-08-10 12:56:12 -05:00
Geoff Bourne e3af06d2e4 Auto-merging via docker-versions-create 2021-08-01 12:12:49 -05:00
Geoff Bourne 0ac583514c Auto-merging via docker-versions-create 2021-07-31 09:27:29 -05:00
Geoff Bourne bf3f15f5fb Auto-merging via docker-versions-create 2021-07-26 19:35:26 -05:00
Geoff Bourne 4aec2322b5 Merge branch 'master' into java8-openj9 2021-07-25 18:20:13 -05:00
Geoff Bourne 51b2eb6851 Auto-merging via docker-versions-create 2021-07-25 09:36:44 -05:00
Geoff Bourne 846050f41a Auto-merging via docker-versions-create 2021-07-23 21:27:37 -05:00
Geoff Bourne 485ec6a141 Auto-merging via docker-versions-create 2021-07-17 21:14:44 -05:00
Geoff Bourne 0096e41882 Auto-merging via docker-versions-create 2021-07-17 20:57:29 -05:00
Geoff Bourne d45610723a Auto-merging via docker-versions-create 2021-07-17 18:03:56 -05:00
Geoff Bourne 072704b54d Auto-merging via docker-versions-create 2021-07-14 18:43:15 -05:00
Geoff Bourne 0f08e88c5b Auto-merging via docker-versions-create 2021-07-12 19:09:42 -05:00
Geoff Bourne 89604c8d13 Auto-merging via docker-versions-create 2021-07-09 19:58:27 -05:00
Geoff Bourne 58842d444b Auto-merging via docker-versions-create 2021-07-08 17:59:28 -05:00
Geoff Bourne 457d09e14d Auto-merging via docker-versions-create 2021-07-08 08:03:47 -05:00
itzg 7210e81f47 Auto-merging via docker-versions-create 2021-07-08 12:56:00 +00:00
Geoff Bourne ba86534e6e Auto-merging via docker-versions-create 2021-07-08 07:38:39 -05:00
itzg 44bafbff09 Auto-merging via docker-versions-create 2021-07-04 19:54:01 +00:00
Geoff Bourne 75c51bf0c7 Merge branch 'master' into java8-openj9 2021-07-03 14:19:04 -05:00
Geoff Bourne cf651f2279 ci: restored limited image platforms for java8-openj9 2021-07-02 16:23:42 -05:00
Geoff Bourne 6d0d7fe19c ci: auto-merge from master 2021-07-02 15:56:54 -05:00
itzg bb58d7a4c9 Auto-merging via docker-versions-create 2021-07-02 16:55:54 +00:00
itzg 6efaac2861 Auto-merging via docker-versions-create 2021-06-28 12:14:05 +00:00
itzg 806342d74b Auto-merging via docker-versions-create 2021-06-27 13:13:11 +00:00
itzg 926e302595 Auto-merging via docker-versions-create 2021-06-24 12:47:05 +00:00
Geoff Bourne 10e85140ad Auto-merging via docker-versions-create 2021-06-23 22:33:45 -05:00
Geoff Bourne fc2ed9e612 Auto-merging via docker-versions-create 2021-06-20 12:48:15 -05:00
Geoff Bourne edfe58079a Auto-merging via docker-versions-create 2021-06-05 17:51:25 -05:00
Geoff Bourne d423cc3b8d Auto-merging via docker-versions-create 2021-05-24 20:50:52 -05:00
Geoff Bourne 1537e48e29 Merge branch 'master' into java8-openj9 2021-05-23 12:26:56 -05:00
Geoff Bourne 62473771dc Merge from master 2021-05-22 13:00:01 -05:00
Geoff Bourne c4528e8f79 Auto-merging via docker-versions-create 2021-05-21 23:02:00 -05:00
Geoff Bourne 0f797487ab Auto-merging via docker-versions-create 2021-05-21 22:48:32 -05:00
Geoff Bourne 9511e3cc80 Merge branch 'master' into java8-openj9 2021-05-21 22:35:00 -05:00
Geoff Bourne 3aa4dd6c85 ci: added java8-openj9 branch 2021-05-21 22:31:40 -05:00
Geoff Bourne 27571999b2 Merge branch 'master' into java8-multiarch 2021-05-21 17:28:44 -05:00
Geoff Bourne bbd7d9e39a ci: introduced CACHE_NAME 2021-05-21 17:26:42 -05:00
Geoff Bourne ef6f308229 Auto-merging via docker-versions-create 2021-05-19 20:27:42 -05:00
Geoff Bourne 49d89d3e73 Auto-merging via docker-versions-create 2021-05-19 20:25:00 -05:00
Geoff Bourne 74203b23f4 Auto-merging via docker-versions-create 2021-05-15 12:41:22 -05:00
Geoff Bourne 4fb791b490 Merge branch 'multiarch' into java8-multiarch
# Conflicts:
#	Dockerfile
#	start-configuration
2021-05-14 17:59:49 -05:00
Geoff Bourne ced25ad50a Auto-merging via docker-versions-create 2021-05-06 20:12:55 -05:00
Geoff Bourne 48efc224ba Auto-merging via docker-versions-create 2021-04-30 14:28:07 -05:00
Geoff Bourne 467c1d9954 Auto-merging via docker-versions-create 2021-04-30 11:11:46 -05:00
Geoff Bourne 9ced230f55 Auto-merging via docker-versions-create 2021-04-28 16:51:29 -05:00
Geoff Bourne f3a8276362 Auto-merging via docker-versions-create 2021-04-26 08:21:06 -05:00
Geoff Bourne b91d63716e Auto-merging via docker-versions-create 2021-04-24 13:42:37 -05:00
Geoff Bourne 46cccfd531 Auto-merging via docker-versions-create 2021-04-23 21:03:21 -05:00
Geoff Bourne 9fe1cb4a0d ci: Switched multiarch-java8 to be based on adoptopenjdk:8-jre-hotspot 2021-04-21 20:13:22 -05:00
Geoff Bourne 076038b470 Auto-merging via docker-versions-create 2021-04-18 13:29:46 -05:00
Geoff Bourne aa416729ea Auto-merging via docker-versions-create 2021-04-11 10:09:19 -05:00
Geoff Bourne 812c6365ec Merged latest from master 2021-04-08 19:14:45 -05:00
Geoff Bourne 42a5131b19 Merging latest from master 2021-04-01 16:32:55 -05:00
Geoff Bourne 624f6a210f Added git
#819
2021-04-01 16:28:32 -05:00
Geoff Bourne 1c63cd18b7 Merge branch 'master' into java8-multiarch
# Conflicts:
#	start-configuration
2021-03-06 16:24:55 -06:00
Geoff Bourne 6266a7e3cc Shifted PATH-fix earlier in startup 2021-03-06 16:04:31 -06:00
Geoff Bourne 871ecd4d9d Merge branch 'master' into java8-multiarch
# Conflicts:
#	start-minecraftFinalSetup
2021-02-27 20:52:36 -06:00
Geoff Bourne c572c95161 Ensure FTBA version.json is readable
#784
2021-02-27 16:58:25 -06:00
Geoff Bourne f7b58fbbb1 Fix PATH to include java when needed 2021-02-10 14:51:24 -06:00
Geoff Bourne eccfa444a9 Auto-merging via docker-versions-create 2021-02-10 14:02:05 -06:00
Geoff Bourne e831d25706 Merged latest from master 2021-02-08 21:18:28 -06:00
Geoff Bourne 12e931332b Auto-merging via docker-versions-create
CONFLICT (content): Merge conflict in Dockerfile
2021-02-07 18:06:06 -06:00
Geoff Bourne ceee9eddc9 ci: restored base image to ubuntu and install openjdk-8 2021-02-06 15:53:59 -06:00
Geoff Bourne 60ba668743 Merge branch 'master' into java8-multiarch
# Conflicts:
#	Dockerfile
2021-02-06 15:49:16 -06:00
Geoff Bourne fd1b15e01f ci: Added java8 variant of multiarch 2021-02-06 15:44:02 -06:00
10 changed files with 75 additions and 93 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ jobs:
uses: docker/build-push-action@v2.7.0
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# ensure latest base image is used
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
pull-requests: write
steps:
- name: Process Stale Issues
uses: actions/stale@v4.0.0
uses: actions/stale@v4.1.0
with:
stale-issue-label: status/stale
stale-pr-label: status/stale
+10 -11
View File
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jdk
FROM adoptopenjdk:8-jdk-openj9
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
@@ -26,7 +26,7 @@ RUN apt-get update \
RUN addgroup --gid 1000 minecraft \
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
COPY files/sudoers* /etc/sudoers.d
COPY --chmod=644 files/sudoers* /etc/sudoers.d
EXPOSE 25565 25575
@@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.10.0
ARG MC_HELPER_VERSION=1.11.0
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \
@@ -78,15 +78,14 @@ ENV UID=1000 GID=1000 \
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
COPY scripts/start* /
COPY bin/ /usr/local/bin/
COPY bin/mc-health /health.sh
COPY files/server.properties /tmp/server.properties
COPY files/log4j2.xml /tmp/log4j2.xml
COPY files/autopause /autopause
COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/
COPY --chmod=755 bin/mc-health /health.sh
COPY --chmod=644 files/server.properties /tmp/server.properties
COPY --chmod=644 files/log4j2.xml /tmp/log4j2.xml
COPY --chmod=755 files/autopause /autopause
RUN dos2unix /start* && chmod +x /start* \
&& dos2unix /autopause/* && chmod +x /autopause/*.sh
RUN dos2unix /start* /autopause/*
ENTRYPOINT [ "/start" ]
HEALTHCHECK --start-period=1m CMD mc-health
+5 -11
View File
@@ -134,7 +134,7 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Running on RaspberryPi](#running-on-raspberrypi)
* [Contributing](#contributing)
<!-- Added by: runner, at: Sat Dec 11 22:09:10 UTC 2021 -->
<!-- Added by: runner, at: Tue Dec 14 02:14:33 UTC 2021 -->
<!--te-->
@@ -275,7 +275,7 @@ When using the image `itzg:/minecraft-server` without a tag, the `latest` image
| Tag name | Java version | Linux | JVM Type | Architecture |
| -------------- | -------------|--------|----------|-------------------|
| latest | 17 | Debian | Hotspot | amd64,arm64,armv7 |
| latest | 16 | Debian | Hotspot | amd64,arm64,armv7 |
| java8 | 8 | Alpine | Hotspot | amd64 |
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
@@ -452,19 +452,13 @@ Plugins can either be managed within the `plugins` subdirectory of the [data dir
Enable Paper server mode by adding a `-e TYPE=PAPER` to your command-line.
By default the container will run the latest build of [Paper server](https://papermc.io/downloads)
but you can also choose to run a specific build with `-e PAPERBUILD=205`.
By default, the container will run the latest build of [Paper server](https://papermc.io/downloads) but you can also choose to run a specific build with `-e PAPERBUILD=205`.
docker run -d -v /path/on/host:/data \
-e TYPE=PAPER \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
If you are hosting your own copy of Paper you can override the download URL with:
- -e PAPER_DOWNLOAD_URL=<url>
An example compose file is provided at
[examples/docker-compose-paper.yml](examples/docker-compose-paper.yml).
If you are hosting your own copy of Paper you can override the download URL with `PAPER_DOWNLOAD_URL=<url>`.
If you have attached a host directory to the `/data` volume, then you can install plugins via the `plugins` subdirectory. You can also [attach a `/plugins` volume](#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
@@ -476,7 +470,7 @@ An [Airplane](https://airplane.gg) server, which is "a stable, optimized, well s
-e TYPE=AIRPLANE
> NOTE: The `VERSION` variable is used to select an Airplane branch to download from. The available options are "LATEST" "1.17" "1.16" "PURPUR" and "PURPUR-1.16"
> NOTE: The `VERSION` variable is used to select an Airplane branch to download from. The available options are "LATEST" "1.17" and "PURPUR"
Extra variables:
- `AIRPLANE_BUILD=lastSuccessfulBuild` : set a specific Airplane build to use
+1 -1
View File
@@ -147,7 +147,7 @@ if [[ $tag ]]; then
"generate_release_notes": true
}
EOF
if ! echo curl "${auth[@]}" -H "Accept: application/vnd.github.v3+json" \
if ! curl "${auth[@]}" -H "Accept: application/vnd.github.v3+json" \
"${base}/repos/${owner}/${repo}/releases" -d "$releaseBody"; then
echo "ERROR failed to create github release $tag"
exit 1
+5 -4
View File
@@ -1,18 +1,19 @@
version: '3.8'
services:
mc:
image: itzg/minecraft-server
container_name: paper
environment:
EULA: "true"
ENABLE_RCON: "true"
TYPE: PAPER
VERSION: 1.9.4
# needed for Paper versions before 1.14
VIEW_DISTANCE: 10
MEMORY: 2G
CONSOLE: "false"
ports:
- 25565:25565
volumes:
- mc-paper:/data
restart: unless-stopped
volumes:
mc-paper:
-18
View File
@@ -115,14 +115,6 @@ case "${TYPE^^}" in
;;
FORGE)
if versionLessThan 1.17; then
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
fi
exec ${SCRIPTS:-/}start-deployForge "$@"
;;
@@ -135,10 +127,6 @@ case "${TYPE^^}" in
;;
FTB|CURSEFORGE)
log "**********************************************************************"
log "NOTE: Some mods and modpacks may require Java 8."
log " If so, use itzg/minecraft-server:java8"
log "**********************************************************************"
exec ${SCRIPTS:-/}start-deployCF "$@"
;;
@@ -183,12 +171,6 @@ case "${TYPE^^}" in
;;
CRUCIBLE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
;;
+2 -11
View File
@@ -6,8 +6,8 @@ isDebugging && set -x
IFS=$'\n\t'
if [ "${VERSION}" != "LATEST" ] && [ "${VERSION}" != "1.16" ] && [ "${VERSION}" != "1.17" ] && [ "${VERSION}" != "PURPUR" ] && [ "${VERSION}" != "PURPUR-1.16" ] ; then
log "ERROR: Airplane server type only supports VERSION=LATEST, VERSION=1.17, VERSION=1.16, VERSION=PURPUR or VERSION=PURPUR-1.16. Note that these are branches, not #.#.# versions."
if [ "${VERSION}" != "LATEST" ] && [ "${VERSION}" != "1.17" ] && [ "${VERSION}" != "PURPUR" ] ; then
log "ERROR: Airplane server type only supports VERSION=LATEST, VERSION=1.17, VERSION=PURPUR. Note that these are branches, not #.#.# versions."
exit 1
fi
@@ -18,20 +18,11 @@ if [ "${VERSION}" = "LATEST" ] || [ "${VERSION}" = "1.17" ]; then
AIRPLANE_BRANCH="1.17"
fi
if [ "${VERSION}" = "1.16" ]; then
AIRPLANE_BRANCH="1.16"
fi
if [ "${VERSION}" = "PURPUR" ]; then
AIRPLANE_BRANCH="Purpur-1.17"
AIRPLANE_TYPE="airplanepurpur"
fi
if [ "${VERSION}" = "PURPUR-1.16" ]; then
AIRPLANE_BRANCH="Purpur-1.16"
AIRPLANE_TYPE="airplanepurpur"
fi
log "Using Airplane-${AIRPLANE_BRANCH} branch"
export SERVER=airplane-${AIRPLANE_BRANCH}-${AIRPLANE_BUILD}.jar
+21 -13
View File
@@ -2,27 +2,31 @@
set -eu
# shellcheck source=start-utils
. ${SCRIPTS:-/}start-utils
. "${SCRIPTS:-/}start-utils"
requireVar VANILLA_VERSION
export TYPE=FABRIC
export SERVER=fabric-server-${VANILLA_VERSION}.jar
: "${FABRIC_INSTALLER_VERSION:=${FABRICVERSION:-LATEST}}"
: "${FABRIC_INSTALLER:=}"
: "${FABRIC_INSTALLER_URL:=}"
: "${FABRIC_LOADER_VERSION:=LATEST}"
isDebugging && set -x
if [[ ! -e ${SERVER} ]]; then
log "Checking Fabric version information."
if [[ $FABRIC_INSTALLER ]]; then
FABRIC_INSTALLER_VERSION=$(echo -n "$FABRIC_INSTALLER" | mc-image-helper hash)
elif [[ $FABRIC_INSTALLER_URL ]]; then
FABRIC_INSTALLER_VERSION=$(echo -n "$FABRIC_INSTALLER_URL" | mc-image-helper hash)
elif [[ ${FABRIC_INSTALLER_VERSION^^} = LATEST ]]; then
FABRIC_INSTALLER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml)
fi
: ${FABRIC_INSTALLER:=}
: ${FABRIC_INSTALLER_URL:=}
: ${FABRIC_LOADER_VERSION:=LATEST}
: ${FABRIC_INSTALLER_VERSION:=${FABRICVERSION:-LATEST}}
export SERVER=fabric-server-${VANILLA_VERSION}-${FABRIC_INSTALLER_VERSION}.jar
if [ ! \( -e ${SERVER} -a -e "server-${VANILLA_VERSION}.jar" \) ]; then
if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then
log "Checking Fabric version information."
if [[ ${FABRIC_INSTALLER_VERSION^^} = LATEST ]]; then
FABRIC_INSTALLER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml)
fi
FABRIC_INSTALLER="fabric-installer-${FABRIC_INSTALLER_VERSION}.jar"
FABRIC_INSTALLER_URL="https://maven.fabricmc.net/net/fabricmc/fabric-installer/${FABRIC_INSTALLER_VERSION}/fabric-installer-${FABRIC_INSTALLER_VERSION}.jar"
elif [[ -z $FABRIC_INSTALLER ]]; then
@@ -66,8 +70,12 @@ if [[ ! -e ${SERVER} ]]; then
exit 10
fi
mv server.jar "server-${VANILLA_VERSION}.jar"
mv fabric-server-launch.jar "${SERVER}"
fi
# Specify which server jar to run
echo "serverJar=server-${VANILLA_VERSION}.jar" > fabric-server-launcher.properties
export FAMILY=FABRIC
exec ${SCRIPTS:-/}start-setupWorld "$@"
exec "${SCRIPTS:-/}start-setupWorld" "$@"
+29 -22
View File
@@ -107,7 +107,36 @@ if [ -n "$ICON" ]; then
fi
fi
canUseRollingLogs=true
patchLog4jConfig() {
file=${1?}
url=${2?}
if ! get -o "$file" "$url"; then
log "ERROR: failed to download corrected log4j config"
exit 1
fi
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
canUseRollingLogs=false
}
# Patch Log4j remote code execution vulnerability
# See https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition
if versionLessThan 1.7; then
: # No patch required here.
elif isFamily VANILLA && versionLessThan 1.12; then
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
elif isFamily VANILLA && versionLessThan 1.17; then
patchLog4jConfig log4j2_112-116.xml https://launcher.mojang.com/v1/objects/02937d122c86ce73319ef9975b58896fc1b491d1/log4j2_112-116.xml
elif versionLessThan 1.18.1; then
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
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"
exit 1
fi
# Set up log configuration
LOGFILE="/data/log4j2.xml"
if [ ! -e "$LOGFILE" ]; then
@@ -150,28 +179,6 @@ if [ -n "$JVM_DD_OPTS" ]; then
done
fi
patchLog4jConfig() {
file=${1?}
url=${2?}
if ! get -o "$file" "$url"; then
log "ERROR: failed to download corrected log4j config"
exit 1
fi
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
}
# Patch Log4j remote code execution vulnerability
# See https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition
if versionLessThan 1.7; then
: # No patch required here.
elif isFamily VANILLA && versionLessThan 1.12; then
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
elif isFamily VANILLA && versionLessThan 1.17; then
patchLog4jConfig log4j2_112-116.xml https://launcher.mojang.com/v1/objects/02937d122c86ce73319ef9975b58896fc1b491d1/log4j2_112-116.xml
elif versionLessThan 1.18.1; then
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
fi
if isTrue ${ENABLE_JMX}; then
: ${JMX_PORT:=7091}
JVM_OPTS="${JVM_OPTS}