From 8bf0d4caa107a3d8c1a9fdc74b55f137a62400d7 Mon Sep 17 00:00:00 2001 From: Luxxy-GF <68338577+Luxxy-GF@users.noreply.github.com> Date: Fri, 17 Jun 2022 15:46:20 +0000 Subject: [PATCH] push for build --- 2.7/Dockerfile | 1 + 3.10/Dockerfile | 1 + 3.5/Dockerfile | 1 + 3.6/Dockerfile | 1 + 3.7/Dockerfile | 1 + 3.8/Dockerfile | 1 + 3.9/Dockerfile | 1 + entrypoint.sh | 21 +++++---------------- start.sh | 8 ++++++++ 9 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 start.sh diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 098e688..49de65c 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -9,4 +9,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/3.10/Dockerfile b/3.10/Dockerfile index b2e0493..253286a 100644 --- a/3.10/Dockerfile +++ b/3.10/Dockerfile @@ -10,4 +10,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 8f4ad6d..5ec44ad 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -9,4 +9,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 30476e0..7c082ee 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -9,4 +9,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/3.7/Dockerfile b/3.7/Dockerfile index 25fb860..6ffc5d1 100644 --- a/3.7/Dockerfile +++ b/3.7/Dockerfile @@ -9,4 +9,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/3.8/Dockerfile b/3.8/Dockerfile index 275101d..03ec0c1 100644 --- a/3.8/Dockerfile +++ b/3.8/Dockerfile @@ -9,4 +9,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/3.9/Dockerfile b/3.9/Dockerfile index 275101d..03ec0c1 100644 --- a/3.9/Dockerfile +++ b/3.9/Dockerfile @@ -9,4 +9,5 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh +COPY --chmod=777 ./start.sh /start.sh CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index d7b3403..eeb312d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,24 +1,13 @@ TZ=${TZ:-UTC} export TZ - -# Set environment variable that holds the Internal Docker IP INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') export INTERNAL_IP - -# Switch to the container's working directory cd /home/container || exit 1 - -# Print Python version +CYAN='\033[0;36m' +RESET_COLOR='\033[0m' printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mpython --version\n" python --version - -# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell -# variable format of "${VARIABLE}" before evaluating the string and automatically -# replacing the values. -PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)") - -# Display the command we're running in the output, and then execute it with the env -# from the container itself. +echo -e "${CYAN}STARTUP /home/container: /start.sh ${RESET_COLOR}" +clear printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" -# shellcheck disable=SC2086 -exec env ${PARSED} \ No newline at end of file +eval '/start.sh' \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..3cddf76 --- /dev/null +++ b/start.sh @@ -0,0 +1,8 @@ +echo running start.sh + +if [ -n "${START_COMMAND1}" ]; then + eval "${START_COMMAND1}" +fi +if [ -n "${START_COMMAND2}" ]; then + eval ${START_COMMAND2} +fi \ No newline at end of file