From c9fd17ef4270fdbd57f932c12cefa36e8939c144 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sun, 15 Nov 2020 13:52:49 -0700 Subject: [PATCH] Revert timezone changes, switch user back to container --- alpine/Dockerfile | 4 +++- alpine/entrypoint.sh | 10 +--------- java10/Dockerfile | 4 +++- java10/entrypoint.sh | 10 +--------- java11/Dockerfile | 4 +++- java11/entrypoint.sh | 10 +--------- java12/Dockerfile | 4 +++- java12/entrypoint.sh | 10 +--------- java13/Dockerfile | 4 +++- java13/entrypoint.sh | 10 +--------- java14/Dockerfile | 4 +++- java14/entrypoint.sh | 10 +--------- java7/Dockerfile | 4 +++- java7/entrypoint.sh | 10 +--------- java8/Dockerfile | 4 +++- java8/entrypoint.sh | 10 +--------- java9/Dockerfile | 4 +++- java9/entrypoint.sh | 10 +--------- 18 files changed, 36 insertions(+), 90 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index bc31634..5d7f96c 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache ca-certificates tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/alpine/entrypoint.sh b/alpine/entrypoint.sh index 02e16ae..cd71e59 100644 --- a/alpine/entrypoint.sh +++ b/alpine/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -30,4 +22,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java10/Dockerfile b/java10/Dockerfile index 70390c2..ca59761 100644 --- a/java10/Dockerfile +++ b/java10/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java10/entrypoint.sh b/java10/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java10/entrypoint.sh +++ b/java10/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java11/Dockerfile b/java11/Dockerfile index add6f31..51457e9 100644 --- a/java11/Dockerfile +++ b/java11/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java11/entrypoint.sh b/java11/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java11/entrypoint.sh +++ b/java11/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java12/Dockerfile b/java12/Dockerfile index c919561..1c6fde9 100644 --- a/java12/Dockerfile +++ b/java12/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java12/entrypoint.sh b/java12/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java12/entrypoint.sh +++ b/java12/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java13/Dockerfile b/java13/Dockerfile index 7c48776..9a9cf19 100644 --- a/java13/Dockerfile +++ b/java13/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java13/entrypoint.sh b/java13/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java13/entrypoint.sh +++ b/java13/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java14/Dockerfile b/java14/Dockerfile index 1dd4c80..4dd8b1d 100644 --- a/java14/Dockerfile +++ b/java14/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java14/entrypoint.sh b/java14/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java14/entrypoint.sh +++ b/java14/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java7/Dockerfile b/java7/Dockerfile index 9088f7a..6e9bff9 100644 --- a/java7/Dockerfile +++ b/java7/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java7/entrypoint.sh b/java7/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java7/entrypoint.sh +++ b/java7/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java8/Dockerfile b/java8/Dockerfile index 6f76172..f9db323 100644 --- a/java8/Dockerfile +++ b/java8/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java8/entrypoint.sh b/java8/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java8/entrypoint.sh +++ b/java8/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP} diff --git a/java9/Dockerfile b/java9/Dockerfile index 860bbc4..8446ea9 100644 --- a/java9/Dockerfile +++ b/java9/Dockerfile @@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ && adduser -D -h /home/container container -USER root +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java9/entrypoint.sh b/java9/entrypoint.sh index 7bd8e66..1f5f5f7 100644 --- a/java9/entrypoint.sh +++ b/java9/entrypoint.sh @@ -11,15 +11,7 @@ TZ=${TZ:-UTC} export TZ -# Set the timezone in the container -echo $TZ > /etc/timezone -ln -s ../usr/share/zoneinfo/$TZ /etc/localtime - # Switch to the container's working directory -USER=container -HOME=/home/container -export USER -export HOME cd /home/container # Set environment variable that holds the Internal Docker IP @@ -33,4 +25,4 @@ MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g' echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}" # Run the startup command -su -c "eval ${MODIFIED_STARTUP}" container +eval ${MODIFIED_STARTUP}