diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..20e0d1f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Pterodactyl Core Dockerfile +# Environment: Source Engine +# Minimum Panel Version: 0.6.0 +# ---------------------------------- +FROM ubuntu:16.04 + +MAINTAINER Pterodactyl Software, +ENV DEBIAN_FRONTEND noninteractive +# Install Dependencies +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y tar curl gcc g++ lib32gcc1 lib32tinfo5 lib32z1 lib32stdc++6 libtinfo5:i386 libncurses5:i386 libcurl3-gnutls:i386 \ + && useradd -m -d /home/container container + +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..46c7124 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Containers -Generic docker containers designed to work with Pterodactyl Panel and its daemon. +Generic docker containers designed to run source engine games. diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..75bc392 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +sleep 5 + +cd /home/container + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | 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