Rewrite to not need bash
This commit is contained in:
@@ -5,7 +5,6 @@ ENV PHP_VER="php81" \
|
||||
NODE_OPTIONS=--openssl-legacy-provider
|
||||
|
||||
RUN apk --no-cache add \
|
||||
bash \
|
||||
curl \
|
||||
nginx \
|
||||
${PHP_VER} \
|
||||
@@ -31,6 +30,7 @@ RUN apk --no-cache add \
|
||||
${PHP_VER}-xmlwriter \
|
||||
${PHP_VER}-zip \
|
||||
${PHP_VER}-zlib && \
|
||||
rm -rf /var/www/localhost && \
|
||||
mkdir -p \
|
||||
/var/www/pterodactyl \
|
||||
/run/nginx \
|
||||
@@ -48,7 +48,7 @@ ADD https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz p
|
||||
|
||||
# Install dependencies, perform Panel installation process
|
||||
RUN apk --no-cache add yarn && \
|
||||
tar -xf panel.tar.gz && \
|
||||
tar -xzvf panel.tar.gz && \
|
||||
rm panel.tar.gz && \
|
||||
chmod -R 755 storage/* bootstrap/cache && \
|
||||
find storage -type d > .storage.tmpl && \
|
||||
@@ -77,7 +77,7 @@ ADD https://github.com/just-containers/s6-overlay/releases/latest/download/s6-ov
|
||||
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it
|
||||
|
||||
# Download common tools
|
||||
ADD https://gitea.taco.quest/Mindfang/ProjectTools/raw/branch/main/DockerUtilities/ContainerTools /usr/bin/ContainerTools
|
||||
ADD https://gitea.taco.quest/Mindfang/ProjectTools/raw/branch/main/DockerUtilities/sh/ContainerTools /usr/bin/ContainerTools
|
||||
|
||||
# Install S6-Overlay and Wait-For-It
|
||||
RUN chmod u+x /usr/local/bin/wait-for-it /etc/s6-overlay/scripts/initializer && \
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#!/command/with-contenv bash
|
||||
#!/command/with-contenv sh
|
||||
|
||||
/usr/sbin/crond -fL /dev/null
|
@@ -1,3 +1,3 @@
|
||||
#!/command/with-contenv bash
|
||||
#!/command/with-contenv sh
|
||||
|
||||
/usr/sbin/nginx -g "daemon off;"
|
@@ -1,3 +1,3 @@
|
||||
#!/command/with-contenv bash
|
||||
#!/command/with-contenv sh
|
||||
|
||||
/usr/sbin/php-fpm -Fc /etc/php
|
@@ -1,4 +1,4 @@
|
||||
#!/command/with-contenv bash
|
||||
#!/command/with-contenv sh
|
||||
|
||||
s6-setuidgid nginx
|
||||
/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
|
@@ -1,13 +1,13 @@
|
||||
#!/command/with-contenv bash
|
||||
#!/command/with-contenv sh
|
||||
|
||||
source ContainerTools
|
||||
SNAME=${BASH_SOURCE##*/}
|
||||
SNAME=${0##*/}
|
||||
WORKDIR="/var/www/pterodactyl"
|
||||
|
||||
#
|
||||
# If DBHOST value is present, pause boot until target container is up.
|
||||
if [ -n "$DBHOST" ]; then
|
||||
log "Waiting for SQL at $DBHOST:${DBPORT:=3306}"
|
||||
if wait-for-it $DBHOST:$DBPORT -q -t ${TESTTIME:=30}; then
|
||||
if wait-for-it $DBHOST:$DBPORT -q -t ${TESTTIME:=30}; then
|
||||
log "SQL found, continuing"
|
||||
else
|
||||
log "SQL could not be reached! Exiting..."
|
||||
@@ -18,7 +18,7 @@ fi
|
||||
# If REDISHOST value is present, pause boot until target container is up.
|
||||
if [ -n "$REDISHOST" ]; then
|
||||
log "Waiting for Redis at $REDISHOST:${REDISPORT:=6379}"
|
||||
if wait-for-it $REDISHOST:$REDISPORT -q -t ${TESTTIME:=30}; then
|
||||
if wait-for-it $REDISHOST:$REDISPORT -q -t ${TESTTIME:=30}; then
|
||||
log "Redis found, continuing"
|
||||
else
|
||||
log "Redis could not be reached! Exiting..."
|
||||
|
Reference in New Issue
Block a user