Skip to content

Commit 0ad97c2

Browse files
Added arclight and nanolimbo types and Meowice flags (#3485)
1 parent f84171d commit 0ad97c2

19 files changed

+326
-24
lines changed

build/ol/install-packages.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ export TARGET
44

55
set -euo pipefail
66

7+
os_major_version=$(awk -F'[= ."]+' '/^VERSION_ID=/{ print $2 }' /etc/os-release)
8+
79
# Install and configure dnf
810
microdnf install dnf -y
911
dnf install 'dnf-command(config-manager)' -y
10-
dnf config-manager --set-enabled ol8_codeready_builder
12+
dnf config-manager --set-enabled ol${os_major_version}_codeready_builder
1113

1214
# Add EPEL repository
13-
tee /etc/yum.repos.d/ol8-epel.repo <<EOF
14-
[ol8_developer_EPEL]
15+
tee /etc/yum.repos.d/ol${os_major_version}-epel.repo <<EOF
16+
[ol${os_major_version}_developer_EPEL]
1517
name=Oracle Linux \$releasever EPEL (\$basearch)
16-
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
18+
baseurl=https://yum.oracle.com/repo/OracleLinux/OL${os_major_version}/developer/EPEL/\$basearch/
1719
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
1820
gpgcheck=1
1921
enabled=1

docs/configuration/jvm-options.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ By default, the image declares an initial and maximum Java memory-heap limit of
88
- `INIT_MEMORY`: independently sets the initial heap size
99
- `MAX_MEMORY`: independently sets the max heap size
1010

11-
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
11+
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
1212

1313
!!! example "Using docker run"
14-
14+
1515
```
1616
-e MEMORY=2G
1717
```
@@ -23,7 +23,7 @@ The values of all three are passed directly to the JVM and support format/units
2323
```
2424

2525
!!! example "Using compose file"
26-
26+
2727
```
2828
environment:
2929
MEMORY: 2G
@@ -48,7 +48,7 @@ To let the JVM calculate the heap size from the container declared memory limit,
4848
deploy:
4949
resources:
5050
limits:
51-
memory: 4G
51+
memory: 4G
5252
```
5353

5454
!!! important
@@ -68,7 +68,7 @@ docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
6868
```yaml
6969
environment:
7070
- EULA=true
71-
- JVM_OPTS=-someJVMOption someJVMOptionValue
71+
- JVM_OPTS=-someJVMOption someJVMOptionValue
7272
```
7373
7474
Using object syntax is recommended and more intuitive:
@@ -112,7 +112,7 @@ If needing to map to a different port, then also set the environment variable `J
112112
!!! example
113113

114114
With a compose file:
115-
115+
116116
```yaml
117117
environment:
118118
ENABLE_JMX: true
@@ -131,3 +131,13 @@ The set of flags documented there can be added using
131131
-e USE_AIKAR_FLAGS=true
132132

133133
When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article.
134+
135+
## Enable MeowIce's Flags
136+
137+
[MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above
138+
139+
The set of flags documented there can be added using
140+
141+
-e USE_MEOWICE_FLAGS=true
142+
143+
There is an optional `USE_MEOWICE_GRAALVM_FLAGS` variable to enable GraalVM specific optimizations, defaults to `TRUE` if USE_MEOWICE_GRAALVM_FLAGS is `TRUE`

docs/types-and-platforms/server-types/bukkit-spigot.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "B
1212
```
1313
docker run ... -e TYPE=SPIGOT ...
1414
```
15-
15+
1616
Compose
1717
```yaml
1818
environment:
@@ -50,3 +50,16 @@ Canyon is on a temporary hiatus, so by default the final build from GitHub will
5050

5151
-e CANYON_BUILD=6
5252
-e CANYON_BUILD=26
53+
54+
### Poseidon
55+
56+
[Poseidon](https://github.com/retromcorg/Project-Poseidon) is a fork of CraftBukkit for Minecraft Beta 1.7.3. It includes multiple enhancements whilst also retaining compatibility with old Bukkit plugins.
57+
58+
-e VERSION=b1.7.3 -e TYPE=CANYON
59+
60+
!!! important
61+
Only `VERSION=b1.7.3` is supported. Since that version pre-dates the health check mechanism used by this image, that will need to be disabled by setting `DISABLE_HEALTHCHECK=true`.
62+
63+
### Uberbukkit
64+
65+
[Uberbukkit](https://github.com/Moresteck/uberbukkit) is a fork of CraftBukkit for Minecraft Beta with Multi version support, supports b1.0 - b1.7.3

docs/types-and-platforms/server-types/hybrids.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ A [Catserver](http://catserver.moe/) type server can be used with
8484
-e TYPE=CATSERVER
8585

8686
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored
87+
88+
### Arclight
89+
90+
A [Arclight](https://arclight.izzel.io/) type server can be used with
91+
92+
-e TYPE=ARCLIGHT
93+
-e ARCLIGHT_TYPE=NEOFORGE,FORGE,FABRIC

docs/types-and-platforms/server-types/others.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ Configuration options with defaults:
3939

4040
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
4141

42+
## NanoLimbo
43+
44+
A [NanoLimbo](https://github.com/Nan1t/NanoLimbo) server can be run by setting `TYPE` to `NANOLIMBO`.
45+
46+
An alternate Limbo server
47+
4248
## Crucible
4349

4450
A [Crucible](https://github.com/CrucibleMC/Crucible) server can be run by setting `TYPE` to `CRUCIBLE`.
@@ -65,4 +71,4 @@ Alternatively, the final `-jar` invocation can be replaced by setting `CUSTOM_JA
6571

6672
When using `docker run` make sure to quote the entire value since it has spaces in it, such as
6773

68-
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"
74+
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"

docs/variables.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
!!! warning
33

4-
The variables listed on this page are manually documented and may be out-of-date or inaccurate.
4+
The variables listed on this page are manually documented and may be out-of-date or inaccurate.
55

66
All other documentation pages are actively maintained, so please use the search box above to find the desired topic.
77

@@ -48,7 +48,7 @@
4848
</tr>
4949
<tr>
5050
<td><code>TZ</code></td>
51-
<td>You can configure the timezone to match yours by setting the TZ environment variable.
51+
<td>You can configure the timezone to match yours by setting the TZ environment variable.
5252

5353
alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
5454

@@ -81,6 +81,18 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
8181
<td><code>false</code></td>
8282
<td>⬜️</td>
8383
</tr>
84+
<tr>
85+
<td><code>USE_MEOWICE_FLAGS</code></td>
86+
<td><a href="https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-">MeowIce has created an updated set of JVM flags</a> based on Aikar's flags but with support for optimizations for Java 17 and above</td>
87+
<td><code>false</code></td>
88+
<td>⬜️</td>
89+
</tr>
90+
<tr>
91+
<td><code>USE_MEOWICE_GRAALVM_FLAGS</code></td>
92+
<td>enables MeowIce's flags for GraalVM if USE_MEOWICE_GRAALVM_FLAGS is TRUE</td>
93+
<td><code>true</code></td>
94+
<td>⬜️</td>
95+
</tr>
8496
<tr>
8597
<td><code>JVM_OPTS</code></td>
8698
<td>General JVM options can be passed to the Minecraft Server invocation by passing a <code>JVM_OPTS</code> environment variable. The JVM requires -XX options to precede -X options, so those can be declared in <code>JVM_XX_OPTS</code>. Both variables are space-delimited, raw JVM arguments</td>
@@ -711,7 +723,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
711723
### CurseForge
712724

713725
!!! tip
714-
726+
715727
Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information.
716728

717729
<table>

scripts/start-configuration

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ case "${TYPE^^}" in
274274
exec "${SCRIPTS:-/}start-deployLimbo" "$@"
275275
;;
276276

277+
NANOLIMBO)
278+
exec "${SCRIPTS:-/}start-deployNanoLimbo" "$@"
279+
;;
280+
277281
CRUCIBLE)
278282
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
279283
;;
@@ -282,11 +286,19 @@ case "${TYPE^^}" in
282286
exec "${SCRIPTS:-/}start-deployLeaf" "$@"
283287
;;
284288

289+
ARCLIGHT)
290+
exec "${SCRIPTS:-/}start-deployArcLight" "$@"
291+
;;
292+
293+
POSEIDON)
294+
exec "${SCRIPTS:-/}start-deployPoseidon" "$@"
295+
;;
296+
285297
*)
286298
logError "Invalid TYPE: '$TYPE'"
287299
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
288300
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
289-
logError " CANYON, LIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
301+
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
290302
exit 1
291303
;;
292304

scripts/start-deployArcLight

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
# shellcheck source=start-utils
4+
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
5+
set -o pipefail
6+
set -e
7+
isDebugging && set -x
8+
9+
resolveVersion
10+
: "${ARCLIGHT_RELEASE:=latest}"
11+
: "${ARCLIGHT_TYPE:=neoforge}"
12+
13+
arclightReleasesUrl=https://api.github.com/repos/IzzelAliz/Arclight/releases
14+
if [[ ${ARCLIGHT_RELEASE^^} = LATEST ]]; then
15+
arclightReleaseUrl=${arclightReleasesUrl}/latest
16+
else
17+
arclightReleaseUrl=${arclightReleasesUrl}/tags/${ARCLIGHT_RELEASE}
18+
fi
19+
20+
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /arclight-${ARCLIGHT_TYPE,,}-${VERSION}-.*\.jar/)].browser_download_url" \
21+
--accept "application/vnd.github.v3+json" "$arclightReleaseUrl"); then
22+
logError "Failed to access ${ARCLIGHT_RELEASE} release of Arclight"
23+
exit 1
24+
fi
25+
26+
if [[ $downloadUrl = null ]]; then
27+
logError "Failed to locate Arclight jar for $VERSION from ${ARCLIGHT_RELEASE}"
28+
exit 1
29+
fi
30+
31+
log "Downloading Arclight from $downloadUrl"
32+
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
33+
logError "Arclight jar from $downloadUrl"
34+
exit 1
35+
fi
36+
37+
export SERVER
38+
export FAMILY=HYBRID
39+
export HYBRIDTYPE="${ARCLIGHT_TYPE,,}"
40+
41+
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployCatserver

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ if [ ! -f ${SERVER} ]; then
2828
fi
2929

3030
export FAMILY=HYBRID
31+
export HYBRIDTYPE=forge
3132

3233
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployCrucible

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ fi
5656

5757
export SERVER
5858
export FAMILY=HYBRID
59+
export HYBRIDTYPE=forge
5960

6061
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployCustom

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ fi
4040

4141
# Allow for overriding Family on custom for testing.
4242
export FAMILY="${FAMILY:-HYBRID}"
43+
export HYBRIDTYPE="${HYBRIDTYPE:-any}"
4344

4445
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployKetting

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ export EXTRA_ARGS
2828

2929
export SERVER
3030
export FAMILY=HYBRID
31+
export HYBRIDTYPE=forge
3132

3233
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployMagma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ fi
2525

2626
export SERVER
2727
export FAMILY=HYBRID
28+
export HYBRIDTYPE=forge
2829

2930
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployMagmaMaintained

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ fi
3434

3535
export SERVER
3636
export FAMILY=HYBRID
37+
export HYBRIDTYPE=forge
3738

3839
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployMohist

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@ if [ ! -f "${SERVER}" ]; then
4848
get -o "${SERVER}" "${downloadUrl}"
4949
fi
5050

51-
export FAMILY=HYBRID
51+
if [[ "${mohistType}" == "mohist" ]]; then
52+
export HYBRIDTYPE=forge
53+
elif [[ "${mohistType}" == "youer" ]]; then
54+
export HYBRIDTYPE=neoforge
55+
elif [[ "${mohistType}" == "banner" ]]; then
56+
export HYBRIDTYPE=fabric
57+
else
58+
log "Unknown server type"
59+
fi
60+
5261
export SERVER
62+
export FAMILY=HYBRID
5363

5464
exec "${SCRIPTS:-/}start-spiget" "$@"

scripts/start-deployNanoLimbo

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# shellcheck source=start-utils
4+
. "${SCRIPTS:-/}start-utils"
5+
isDebugging && set -x
6+
7+
if ! SERVER=$(mc-image-helper github download-latest-asset \
8+
--output-directory=/data \
9+
--name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \
10+
Nan1t/NanoLimbo
11+
); then
12+
logError "Failed to download NanoLimbo"
13+
exit 1
14+
fi
15+
16+
export SERVER
17+
export FAMILY=LIMBO
18+
19+
exec ${SCRIPTS:-/}start-setupMounts $@

scripts/start-deployPoseidon

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# shellcheck source=start-utils
4+
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
5+
set -o pipefail
6+
set -e
7+
isDebugging && set -x
8+
9+
resolveVersion
10+
11+
if [ "${VERSION}" != "b1.7.3" ]; then
12+
logError "Poseidon server type only supports VERSION=b1.7.3"
13+
exit 1
14+
fi
15+
16+
# : "${POSEIDON_RELEASE:=latest}" placeholder until I figure out how to add version selection with mc-image-helper
17+
: "${POSEIDON_TYPE:=poseidon}"
18+
19+
if [[ ${POSEIDON_TYPE^^} = UBERBUKKIT ]]; then
20+
poseidonRepo="Moresteck/uberbukkit"
21+
else
22+
poseidonRepo="retromcorg/Project-Poseidon"
23+
fi
24+
25+
if ! SERVER=$(mc-image-helper github download-latest-asset \
26+
--output-directory=/data \
27+
--name-pattern="^(?!original-).+\.jar" \
28+
${poseidonRepo}
29+
); then
30+
logError "Failed to download ${POSEIDON_TYPE}"
31+
exit 1
32+
fi
33+
34+
export SERVER
35+
export FAMILY=SPIGOT
36+
37+
exec "${SCRIPTS:-/}start-spiget" "$@"

0 commit comments

Comments
 (0)