diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..435b99f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# ---------------------------------- +# Pterodactyl Core Dockerfile +# Environment: glibc +# Minimum Panel Version: 0.6.0 +# ---------------------------------- +FROM node:8.9-alpine + +MAINTAINER Pterodactyl Software, + +RUN adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/ash", "/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..e785290 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/ash +cd /home/container + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# 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} \ No newline at end of file