From 415f722708b992df358bf8959d0988c98770b997 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 17 Mar 2017 19:29:12 -0400 Subject: [PATCH] Push core java image. --- Dockerfile | 23 +++++++++++++++++++++++ README.md | 4 ++-- entrypoint.sh | 19 +++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 Dockerfile create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3430d25 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# ---------------------------------- +# Pterodactyl Core Dockerfile +# Environment: Java +# Minimum Panel Version: 0.6.0 +# ---------------------------------- +FROM frolvlad/alpine-oraclejdk8:cleaned + +MAINTAINER Pterodactyl Software, + +RUN apk update \ + && apk upgrade \ + && apk add --no-cache --update curl ca-certificates openssl git tar bash \ + && adduser -D -h /home/container container + +USER container +ENV USER container +ENV HOME /home/container + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh + +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/README.md b/README.md index 6362937..beb853c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Containers -Generic docker containers designed to work with Pterodactyl Panel and its daemon. +# Containers: Java +Generic java container built on top of Alpine Linux to support games such as Minecraft and Bungeecord. diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..c0ff9ec --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/bash +sleep 5 + +cd /home/container + +# Output Current Java Version +java -version + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP_CMD} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +${MODIFIED_STARTUP} + +if [ $? -ne 0 ]; then + echo "PTDL_CONTAINER_ERR: There was an error while attempting to run the start command." + exit 1 +fi