-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'docker-geyser' from commit '692edc0d8594ed935eb68cee7721ecfcd667…
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |