Revert timezone changes, switch user back to container

This commit is contained in:
Matthew Penner 2020-11-15 13:52:49 -07:00
parent 0859211185
commit c9fd17ef42
18 changed files with 36 additions and 90 deletions

View file

@ -12,7 +12,9 @@ LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io"
RUN apk add --update --no-cache ca-certificates tzdata \ RUN apk add --update --no-cache ca-certificates tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}

View file

@ -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 \ RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER root USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ] CMD [ "/bin/ash", "/entrypoint.sh" ]

View file

@ -11,15 +11,7 @@
TZ=${TZ:-UTC} TZ=${TZ:-UTC}
export TZ 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 # Switch to the container's working directory
USER=container
HOME=/home/container
export USER
export HOME
cd /home/container cd /home/container
# Set environment variable that holds the Internal Docker IP # 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}" echo "[container@pterodactyl ~]$ ${MODIFIED_STARTUP}"
# Run the startup command # Run the startup command
su -c "eval ${MODIFIED_STARTUP}" container eval ${MODIFIED_STARTUP}