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