diff --git a/minecraft-server/Dockerfile b/minecraft-server/Dockerfile index 594a6f73..5aa881bd 100644 --- a/minecraft-server/Dockerfile +++ b/minecraft-server/Dockerfile @@ -18,7 +18,7 @@ RUN apk add --no-cache -U \ nano \ python python-dev py2-pip -RUN pip install mcstatus +RUN pip install mcstatus yq HEALTHCHECK CMD mcstatus localhost:$SERVER_PORT ping diff --git a/minecraft-server/start-deployFabric b/minecraft-server/start-deployFabric index 96afa681..76ff0e66 100644 --- a/minecraft-server/start-deployFabric +++ b/minecraft-server/start-deployFabric @@ -10,20 +10,8 @@ if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then echo "Checking Fabric version information." case $FABRICVERSION in LATEST) - FABRIC_VERSION=$(python - << 'EOF' -import sys -import xml.etree.ElementTree as ET -from contextlib import closing -from urllib2 import urlopen - -with closing(urlopen('https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml')) as resp: - xml = resp.read() - -root = ET.fromstring(xml) -version = root.find('*/release').text -print version -EOF -) + curl -fsSL https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml | xq -c . > /tmp/fabric.json + FABRIC_VERSION=$(< /tmp/fabric.json jq -r ".metadata.versioning.release") ;; *)