Issue running Minecraft Server on Clear Linux's OpenJDK docker images

I’m recently trying to setup my Minecraft server with Clear Linux’s OpenJDK 19.0.2.7.1 docker image. But I have so far ran into an issue when trying to run the server

[23:22:20] [main/ERROR]: Failed to start the minecraft server
joptsimple.UnrecognizedOptionException: m is not a recognized option

I’m running the server with Fabric and on Pterodactyl, and this seems to only happen when I use any of the Clear Linux’s OpenJDK docker images and not other OpenJDK images.
The thing is, I have tried booting up a Clear Linux VM (just ISO with Java on top, not docker image bc I haven’t had success in making a container with that) and run the exact same command with the same Java version, and it seems to be working alright.

Here is the full log of the Minecraft server:

[23:22:20] [main/INFO]: Loading Minecraft 1.20.1 with Fabric Loader 0.14.21
[23:22:20] [main/INFO]: Fabric is preparing JARs on first launch, this may take a few seconds...
[23:22:20] [main/INFO]: Loading 3 mods:
	- fabricloader 0.14.21
	- java 19
	- minecraft 1.20.1
[23:22:20] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/mnt/server/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[23:22:20] [main/ERROR]: Failed to start the minecraft server
joptsimple.UnrecognizedOptionException: m is not a recognized option
	at joptsimple.OptionException.unrecognizedOption(OptionException.java:108) ~[jopt-simple-5.0.4.jar:?]
	at joptsimple.OptionParser.validateOptionCharacters(OptionParser.java:633) ~[jopt-simple-5.0.4.jar:?]
	at joptsimple.OptionParser.handleShortOptionCluster(OptionParser.java:528) ~[jopt-simple-5.0.4.jar:?]
	at joptsimple.OptionParser.handleShortOptionToken(OptionParser.java:523) ~[jopt-simple-5.0.4.jar:?]
	at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:59) ~[jopt-simple-5.0.4.jar:?]
	at joptsimple.OptionParser.parse(OptionParser.java:396) ~[jopt-simple-5.0.4.jar:?]
	at net.minecraft.server.Main.main(Main.java:90) ~[server-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-mc.1.20.1-loader.0.14.21-launcher.0.11.2.jar:0.11.2]

Here is what it should looks like:

Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[23:54:41] [main/INFO]: Loading Minecraft 1.20.1 with Fabric Loader 0.14.21
[23:54:41] [main/INFO]: Loading 3 mods:
        - fabricloader 0.14.21
        - java 19
        - minecraft 1.20.1
[23:54:41] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/mnt/server/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[23:54:50] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

This is the install script I wrote:

#!/bin/bash
# Fabric Minecraft Installation Script
#
# Server Files: /mnt/server
echo -e "It is recommended that you install all system updates before running this script"
swupd check-update
swupd bundle-add -y curl jq unzip sysadmin-basic wget
mkdir -p /mnt/server
cd /mnt/server

# Enable snapshots
if [ -z "$MC_VERSION" ] || [ "$MC_VERSION" == "latest" ]; then
  MC_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/game | jq -r '.[] | select(.stable== true )|.version' | head -n1)
  echo -e "latest version is $MC_VERSION"
elif [ "$MC_VERSION" == "snapshot" ]; then
  MC_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/game | jq -r '.[] | select(.stable== false )|.version' | head -n1)
  echo -e "latest snapshot is $MC_VERSION"
fi

if [ -z "$FABRIC_VERSION" ] || [ "$FABRIC_VERSION" == "latest" ]; then
  FABRIC_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/installer | jq -r '.[0].version')
  echo -e "latest fabric version is $FABRIC_VERSION"
fi

if [ -z "$LOADER_VERSION" ] || [ "$LOADER_VERSION" == "latest" ]; then
  LOADER_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/loader | jq -r '.[] | select(.stable== true )|.version' | head -n1)
  echo -e "latest fabric loader version is $LOADER_VERSION"
elif [ "$LOADER_VERSION" == "snapshot" ]; then
  LOADER_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/loader | jq -r '.[] | select(.stable== false )|.version' | head -n1)
  echo -e "latest fabric loader snapshot is $LOADER_VERSION"
fi

echo -e "running: curl -OJ https://meta.fabricmc.net/v2/versions/loader/$MC_VERSION/$LOADER_VERSION/$FABRIC_VERSION/server/jar"
curl -OJ https://meta.fabricmc.net/v2/versions/loader/$MC_VERSION/$LOADER_VERSION/$FABRIC_VERSION/server/jar
echo -e "running: java -jar fabric-server-mc.$MC_VERSION-loader.$LOADER_VERSION-launcher.$FABRIC_VERSION.jar server -mcversion $MC_VERSION -loader $LOADER_VERSION -downloadMinecraft"
java -jar fabric-server-mc.$MC_VERSION-loader.$LOADER_VERSION-launcher.$FABRIC_VERSION.jar server -mcversion $MC_VERSION -loader $LOADER_VERSION -downloadMinecraft
echo -e "Renaming fabric-server-mc.$MC_VERSION-loader.$LOADER_VERSION-launcher.$FABRIC_VERSION.jar >> fabric-server.jar"
mv /mnt/server/fabric-server-mc.$MC_VERSION-loader.$LOADER_VERSION-launcher.$FABRIC_VERSION.jar /mnt/server/fabric-server.jar
echo "serverJar=server-$MC_VERSION.jar" > fabric-server-launcher.properties
echo -e "Access server files at: /mnt/server"
echo -e "Installation Completed"

Here is the Minecraft startup command:
java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}

Here is the image I used to run the MC server & script container:
clearlinux/openjdk:19.0.2.7.1

Here is the script I based on to wrote my script which work flawlessly (use openjdk:11-jdk-slim as script container, Package yolks · GitHub to run Minecraft, same MC startup command):

#!/bin/bash
# Fabric MC Installation Script
#
# Server Files: /mnt/server
apt update
apt install -y curl jq unzip dos2unix wget
mkdir -p /mnt/server
cd /mnt/server

# Enable snapshots
if [ -z "$MC_VERSION" ] || [ "$MC_VERSION" == "latest" ]; then
  MC_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/game | jq -r '.[] | select(.stable== true )|.version' | head -n1)
elif [ "$MC_VERSION" == "snapshot" ]; then
  MC_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/game | jq -r '.[] | select(.stable== false )|.version' | head -n1)
fi

if [ -z "$FABRIC_VERSION" ] || [ "$FABRIC_VERSION" == "latest" ]; then
  FABRIC_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/installer | jq -r '.[0].version')
fi

if [ -z "$LOADER_VERSION" ] || [ "$LOADER_VERSION" == "latest" ]; then
  LOADER_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/loader | jq -r '.[] | select(.stable== true )|.version' | head -n1)
elif [ "$LOADER_VERSION" == "snapshot" ]; then
  LOADER_VERSION=$(curl -sSL https://meta.fabricmc.net/v2/versions/loader | jq -r '.[] | select(.stable== false )|.version' | head -n1)
fi

wget -O fabric-installer.jar https://maven.fabricmc.net/net/fabricmc/fabric-installer/$FABRIC_VERSION/fabric-installer-$FABRIC_VERSION.jar
java -jar fabric-installer.jar server -mcversion $MC_VERSION -loader $LOADER_VERSION -downloadMinecraft
mv server.jar minecraft-server.jar
mv fabric-server-launch.jar server.jar
echo "serverJar=minecraft-server.jar" > fabric-server-launcher.properties
echo -e "Install Complete"

It’s quite an oddly specific question honestly, I have tried searching but to know avail, so I’d be glad if you are able to help :smile: