Skip to content

Commit

Permalink
Add 'docker-geyser' from commit '692edc0d8594ed935eb68cee7721ecfcd667…
Browse files Browse the repository at this point in the history
…5fb8'

git-subtree-dir: docker-geyser
git-subtree-mainline: 6ce14e2
git-subtree-split: 692edc0
  • Loading branch information
rtm516 committed Sep 13, 2023
2 parents 6ce14e2 + 692edc0 commit fc91f04
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docker-geyser/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ----------------------------------
# Pterodactyl Core Dockerfile
# Environment: Java (glibc support)
# Minimum Panel Version: 0.6.0
# ----------------------------------
FROM openjdk:17-slim

LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"

RUN apt-get update -y \
&& apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig libfreetype6 tzdata iproute2 libstdc++6 \
&& useradd -d /home/container -m container

USER container
ENV USER=container HOME=/home/container

USER container
ENV USER=container HOME=/home/container

WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh

CMD ["/bin/bash", "/entrypoint.sh"]
2 changes: 2 additions & 0 deletions docker-geyser/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Containers: GeyserMC
Container built for auto updating of GeyserMC, built upon https://github.com/pterodactyl/images/tree/java.
34 changes: 34 additions & 0 deletions docker-geyser/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
cd /home/container

# Output Current Java Version
java -version

# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`

# Check auto update is on
if [ "${AUTO_UPDATE}" == "1" ]; then
echo "Checking for updates..."

LATEST_HASH=`curl -s https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/${UPDATE_BRANCH}/lastSuccessfulBuild/api/xml?xpath=//lastBuiltRevision/SHA1 | sed 's/.*>\(.*\)<.*/\1/'`
CURRENT_HASH=`cat .currenthash 2>/dev/null`

if [ "$LATEST_HASH" != "$CURRENT_HASH" ]; then
echo "Update available!"
echo "Updating from '$CURRENT_HASH' -> '$LATEST_HASH'"
curl -s -o ${SERVER_JARFILE} https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/${UPDATE_BRANCH}/lastSuccessfulBuild/artifact/bootstrap/standalone/build/libs/Geyser-Standalone.jar

echo "$LATEST_HASH" > ".currenthash"
echo "Updated!"
else
echo "No update available"
fi
fi

# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"

# Run the Server
eval ${MODIFIED_STARTUP}

0 comments on commit fc91f04

Please sign in to comment.