From 68ecd36458565d51ac17938f0c4a297bdea5d9ad Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 11 Aug 2024 10:08:47 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dockerfile Dockerfile.8 Dockerfile.9 .env.scripts .env.scripts.8 .env.scripts.9 --- .env.scripts | 4 ++-- .env.scripts.8 | 4 ++-- .env.scripts.9 | 4 ++-- Dockerfile | 25 +++++++++++++------------ Dockerfile.8 | 27 ++++++++++++++------------- Dockerfile.9 | 27 ++++++++++++++------------- 6 files changed, 47 insertions(+), 44 deletions(-) diff --git a/.env.scripts b/.env.scripts index 6cf34dd..fd9f8fd 100644 --- a/.env.scripts +++ b/.env.scripts @@ -1,10 +1,10 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -##@Version : 202408101731-git +##@Version : 202408111005-git # @@Author : CasjaysDev # @@Contact : CasjaysDev # @@License : MIT # @@Copyright : Copyright 2024 CasjaysDev -# @@Created : Sat Aug 10 05:31:11 PM EDT 2024 +# @@Created : Sun Aug 11 10:05:00 AM EDT 2024 # @@File : .env.scripts # @@Description : Variables for gen-dockerfile and buildx scripts # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.env.scripts.8 b/.env.scripts.8 index 0a75d96..c3f8578 100644 --- a/.env.scripts.8 +++ b/.env.scripts.8 @@ -1,10 +1,10 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -##@Version : 202408101731-git +##@Version : 202408111005-git # @@Author : CasjaysDev # @@Contact : CasjaysDev # @@License : MIT # @@Copyright : Copyright 2024 CasjaysDev -# @@Created : Sat Aug 10 05:31:11 PM EDT 2024 +# @@Created : Sun Aug 11 10:05:00 AM EDT 2024 # @@File : .env.scripts.8 # @@Description : Variables for gen-dockerfile and buildx scripts # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.env.scripts.9 b/.env.scripts.9 index 7be4982..894f16a 100644 --- a/.env.scripts.9 +++ b/.env.scripts.9 @@ -1,10 +1,10 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -##@Version : 202408101731-git +##@Version : 202408111005-git # @@Author : CasjaysDev # @@Contact : CasjaysDev # @@License : MIT # @@Copyright : Copyright 2024 CasjaysDev -# @@Created : Sat Aug 10 05:31:11 PM EDT 2024 +# @@Created : Sun Aug 11 10:05:00 AM EDT 2024 # @@File : .env.scripts.9 # @@Description : Variables for gen-dockerfile and buildx scripts # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Dockerfile b/Dockerfile index e630cfe..dd4ff59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Docker image for almalinux using the rhel template ARG IMAGE_NAME="almalinux" ARG PHP_SERVER="almalinux" -ARG BUILD_DATE="202408101731" +ARG BUILD_DATE="202408111004" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" ARG WWW_ROOT_DIR="/usr/share/httpd/default" @@ -76,7 +76,7 @@ RUN set -e; \ [ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/bin/sh" || true; \ [ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/usr/bin/sh" || true; \ [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh"] && symlink "$BASH_CMD" "$SH_CMD" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true + [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] @@ -86,14 +86,15 @@ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ $SHELL_OPTS; \ mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ - if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";bash "/root/docker/setup/00-init.sh";echo "Done running the init script";fi; \ + if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";/root/docker/setup/00-init.sh||{ echo "Failed to execute /root/docker/setup/00-init.sh" >&2 && exit 10; };echo "Done running the init script";fi; \ echo "" RUN echo "Creating and editing system files "; \ $SHELL_OPTS; \ + mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ touch "/etc/profile" "/root/.profile"; \ pkmgr update && pkmgr install epel-release; crb enable || true; \ - if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";bash "/root/docker/setup/01-system.sh";echo "Done running the system script";fi; \ + if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \ echo "" RUN echo "Running pre-package commands"; \ @@ -107,7 +108,7 @@ RUN echo "Setting up and installing packages"; \ RUN echo "Initializing packages before copying files to image"; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";bash "/root/docker/setup/02-packages.sh";echo "Done running the packages script";fi; \ + if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";/root/docker/setup/02-packages.sh||{ echo "Failed to execute /root/docker/setup/02-packages.sh" >&2 && exit 10; };echo "Done running the packages script";fi; \ echo "" COPY ./rootfs/. / @@ -133,16 +134,16 @@ RUN echo "Updating system files "; \ if [ -z "$(command -v "apt-get" 2>/dev/null)" ];then grep -s -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc"; fi; \ if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \ if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/${PHP_VERSION}" ];then ln -sf "/etc/${PHP_VERSION}" "/etc/php";fi; \ - if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";bash "/root/docker/setup/03-files.sh";echo "Done running the files script";fi; \ + if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";/root/docker/setup/03-files.sh||{ echo "Failed to execute /root/docker/setup/03-files.sh" >&2 && exit 10; };echo "Done running the files script";fi; \ echo "" RUN echo "Custom Settings"; \ $SHELL_OPTS; \ - echo "" +echo "" RUN echo "Setting up users and scripts "; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/04-users.sh" ];then echo "Running the users script";bash "/root/docker/setup/04-users.sh";echo "Done running the users script";fi; \ + if [ -f "/root/docker/setup/04-users.sh" ];then echo "Running the users script";/root/docker/setup/04-users.sh||{ echo "Failed to execute /root/docker/setup/04-users.sh" >&2 && exit 10; };echo "Done running the users script";fi; \ echo "" RUN echo "Running the user init commands"; \ @@ -155,15 +156,15 @@ RUN echo "Setting OS Settings "; \ RUN echo "Custom Applications"; \ $SHELL_OPTS; \ - echo "" +echo "" RUN echo "Running custom commands"; \ - if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";bash "/root/docker/setup/05-custom.sh";echo "Done running the custom script";fi; \ + if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom" && exit 10; };echo "Done running the custom script";fi; \ echo "" RUN echo "Running final commands before cleanup"; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/06-post.sh" ];then echo "Running the post script";bash "/root/docker/setup/06-post.sh";echo "Done running the post script";fi; \ + if [ -f "/root/docker/setup/06-post.sh" ];then echo "Running the post script";/root/docker/setup/06-post.sh||{ echo "Failed to execute /root/docker/setup/06-post.sh" >&2 && exit 10; };echo "Done running the post script";fi; \ echo "" RUN echo "Deleting unneeded files"; \ @@ -179,7 +180,7 @@ RUN echo "Deleting unneeded files"; \ rm -rf /lib/systemd/system/sockets.target.wants/*initctl* || true; \ rm -Rf /usr/share/doc/* /var/tmp/* /var/cache/*/* /root/.cache/* /usr/share/info/* /tmp/* || true; \ if [ -d "/lib/systemd/system/sysinit.target.wants" ];then cd "/lib/systemd/system/sysinit.target.wants" && rm -f $(ls | grep -v systemd-tmpfiles-setup);fi; \ - if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";bash "/root/docker/setup/07-cleanup.sh";echo "Done running the cleanup script";fi; \ + if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute /root/docker/setup/07-cleanup.sh" >&2 && exit 10; };echo "Done running the cleanup script";fi; \ echo "" RUN echo "Init done" diff --git a/Dockerfile.8 b/Dockerfile.8 index d441cac..0d81263 100644 --- a/Dockerfile.8 +++ b/Dockerfile.8 @@ -2,7 +2,7 @@ # Docker image for almalinux using the rhel template ARG IMAGE_NAME="almalinux" ARG PHP_SERVER="almalinux" -ARG BUILD_DATE="202408101731" +ARG BUILD_DATE="202408111005" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" ARG WWW_ROOT_DIR="/usr/share/httpd/default" @@ -53,7 +53,7 @@ ARG PHP_VERSION ARG PHP_SERVER ARG SHELL_OPTS -ARG PACK_LIST="bash-completion git curl wget sudo unzip tini iproute net-tools glibc-langpack-en pinentry nail postfix python3-pip certbot ca-certificates jq " +ARG PACK_LIST="bash-completion git curl wget sudo unzip tini iproute net-tools glibc-langpack-en pinentry nail postfix python3-pip certbot ca-certificates " ENV ENV=~/.profile ENV SHELL="/bin/sh" @@ -76,7 +76,7 @@ RUN set -e; \ [ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/bin/sh" || true; \ [ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/usr/bin/sh" || true; \ [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh"] && symlink "$BASH_CMD" "$SH_CMD" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true + [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] @@ -86,14 +86,15 @@ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ $SHELL_OPTS; \ mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ - if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";/root/docker/setup/00-init.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the init script";fi; \ + if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";/root/docker/setup/00-init.sh||{ echo "Failed to execute /root/docker/setup/00-init.sh" >&2 && exit 10; };echo "Done running the init script";fi; \ echo "" RUN echo "Creating and editing system files "; \ $SHELL_OPTS; \ + mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ touch "/etc/profile" "/root/.profile"; \ pkmgr update && pkmgr install epel-release; crb enable || true; \ - if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the system script";fi; \ + if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \ echo "" RUN echo "Running pre-package commands"; \ @@ -107,7 +108,7 @@ RUN echo "Setting up and installing packages"; \ RUN echo "Initializing packages before copying files to image"; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";bash "/root/docker/setup/02-packages.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the packages script";fi; \ + if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";/root/docker/setup/02-packages.sh||{ echo "Failed to execute /root/docker/setup/02-packages.sh" >&2 && exit 10; };echo "Done running the packages script";fi; \ echo "" COPY ./rootfs/. / @@ -133,16 +134,16 @@ RUN echo "Updating system files "; \ if [ -z "$(command -v "apt-get" 2>/dev/null)" ];then grep -s -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc"; fi; \ if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \ if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/${PHP_VERSION}" ];then ln -sf "/etc/${PHP_VERSION}" "/etc/php";fi; \ - if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";bash "/root/docker/setup/03-files.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the files script";fi; \ + if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";/root/docker/setup/03-files.sh||{ echo "Failed to execute /root/docker/setup/03-files.sh" >&2 && exit 10; };echo "Done running the files script";fi; \ echo "" RUN echo "Custom Settings"; \ $SHELL_OPTS; \ - echo "" +echo "" RUN echo "Setting up users and scripts "; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/04-users.sh" ];then echo "Running the users script";bash "/root/docker/setup/04-users.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the users script";fi; \ + if [ -f "/root/docker/setup/04-users.sh" ];then echo "Running the users script";/root/docker/setup/04-users.sh||{ echo "Failed to execute /root/docker/setup/04-users.sh" >&2 && exit 10; };echo "Done running the users script";fi; \ echo "" RUN echo "Running the user init commands"; \ @@ -155,15 +156,15 @@ RUN echo "Setting OS Settings "; \ RUN echo "Custom Applications"; \ $SHELL_OPTS; \ - echo "" +echo "" RUN echo "Running custom commands"; \ - if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";bash "/root/docker/setup/05-custom.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the custom script";fi; \ + if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom" && exit 10; };echo "Done running the custom script";fi; \ echo "" RUN echo "Running final commands before cleanup"; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/06-post.sh" ];then echo "Running the post script";bash "/root/docker/setup/06-post.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the post script";fi; \ + if [ -f "/root/docker/setup/06-post.sh" ];then echo "Running the post script";/root/docker/setup/06-post.sh||{ echo "Failed to execute /root/docker/setup/06-post.sh" >&2 && exit 10; };echo "Done running the post script";fi; \ echo "" RUN echo "Deleting unneeded files"; \ @@ -179,7 +180,7 @@ RUN echo "Deleting unneeded files"; \ rm -rf /lib/systemd/system/sockets.target.wants/*initctl* || true; \ rm -Rf /usr/share/doc/* /var/tmp/* /var/cache/*/* /root/.cache/* /usr/share/info/* /tmp/* || true; \ if [ -d "/lib/systemd/system/sysinit.target.wants" ];then cd "/lib/systemd/system/sysinit.target.wants" && rm -f $(ls | grep -v systemd-tmpfiles-setup);fi; \ - if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";bash "/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the cleanup script";fi; \ + if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute /root/docker/setup/07-cleanup.sh" >&2 && exit 10; };echo "Done running the cleanup script";fi; \ echo "" RUN echo "Init done" diff --git a/Dockerfile.9 b/Dockerfile.9 index 5dcff49..7020887 100644 --- a/Dockerfile.9 +++ b/Dockerfile.9 @@ -2,7 +2,7 @@ # Docker image for almalinux using the rhel template ARG IMAGE_NAME="almalinux" ARG PHP_SERVER="almalinux" -ARG BUILD_DATE="202408101731" +ARG BUILD_DATE="202408111005" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" ARG WWW_ROOT_DIR="/usr/share/httpd/default" @@ -53,7 +53,7 @@ ARG PHP_VERSION ARG PHP_SERVER ARG SHELL_OPTS -ARG PACK_LIST="bash-completion git curl wget sudo unzip tini iproute net-tools glibc-langpack-en pinentry nail postfix python3-pip certbot ca-certificates jq " +ARG PACK_LIST="bash-completion git curl wget sudo unzip tini iproute net-tools glibc-langpack-en pinentry nail postfix python3-pip certbot ca-certificates " ENV ENV=~/.profile ENV SHELL="/bin/sh" @@ -76,7 +76,7 @@ RUN set -e; \ [ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/bin/sh" || true; \ [ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/usr/bin/sh" || true; \ [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh"] && symlink "$BASH_CMD" "$SH_CMD" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true + [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] @@ -86,14 +86,15 @@ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ $SHELL_OPTS; \ mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ - if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";bash "/root/docker/setup/00-init.sh";echo "Done running the init script";fi; \ + if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";/root/docker/setup/00-init.sh||{ echo "Failed to execute /root/docker/setup/00-init.sh" >&2 && exit 10; };echo "Done running the init script";fi; \ echo "" RUN echo "Creating and editing system files "; \ $SHELL_OPTS; \ + mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ touch "/etc/profile" "/root/.profile"; \ pkmgr update && pkmgr install epel-release; crb enable || true; \ - if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";bash "/root/docker/setup/01-system.sh";echo "Done running the system script";fi; \ + if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \ echo "" RUN echo "Running pre-package commands"; \ @@ -107,7 +108,7 @@ RUN echo "Setting up and installing packages"; \ RUN echo "Initializing packages before copying files to image"; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";bash "/root/docker/setup/02-packages.sh";echo "Done running the packages script";fi; \ + if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";/root/docker/setup/02-packages.sh||{ echo "Failed to execute /root/docker/setup/02-packages.sh" >&2 && exit 10; };echo "Done running the packages script";fi; \ echo "" COPY ./rootfs/. / @@ -133,16 +134,16 @@ RUN echo "Updating system files "; \ if [ -z "$(command -v "apt-get" 2>/dev/null)" ];then grep -s -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc"; fi; \ if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \ if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/${PHP_VERSION}" ];then ln -sf "/etc/${PHP_VERSION}" "/etc/php";fi; \ - if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";bash "/root/docker/setup/03-files.sh";echo "Done running the files script";fi; \ + if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";/root/docker/setup/03-files.sh||{ echo "Failed to execute /root/docker/setup/03-files.sh" >&2 && exit 10; };echo "Done running the files script";fi; \ echo "" RUN echo "Custom Settings"; \ $SHELL_OPTS; \ - echo "" +echo "" RUN echo "Setting up users and scripts "; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/04-users.sh" ];then echo "Running the users script";bash "/root/docker/setup/04-users.sh";echo "Done running the users script";fi; \ + if [ -f "/root/docker/setup/04-users.sh" ];then echo "Running the users script";/root/docker/setup/04-users.sh||{ echo "Failed to execute /root/docker/setup/04-users.sh" >&2 && exit 10; };echo "Done running the users script";fi; \ echo "" RUN echo "Running the user init commands"; \ @@ -155,15 +156,15 @@ RUN echo "Setting OS Settings "; \ RUN echo "Custom Applications"; \ $SHELL_OPTS; \ - echo "" +echo "" RUN echo "Running custom commands"; \ - if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";bash "/root/docker/setup/05-custom.sh";echo "Done running the custom script";fi; \ + if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom" && exit 10; };echo "Done running the custom script";fi; \ echo "" RUN echo "Running final commands before cleanup"; \ $SHELL_OPTS; \ - if [ -f "/root/docker/setup/06-post.sh" ];then echo "Running the post script";bash "/root/docker/setup/06-post.sh";echo "Done running the post script";fi; \ + if [ -f "/root/docker/setup/06-post.sh" ];then echo "Running the post script";/root/docker/setup/06-post.sh||{ echo "Failed to execute /root/docker/setup/06-post.sh" >&2 && exit 10; };echo "Done running the post script";fi; \ echo "" RUN echo "Deleting unneeded files"; \ @@ -179,7 +180,7 @@ RUN echo "Deleting unneeded files"; \ rm -rf /lib/systemd/system/sockets.target.wants/*initctl* || true; \ rm -Rf /usr/share/doc/* /var/tmp/* /var/cache/*/* /root/.cache/* /usr/share/info/* /tmp/* || true; \ if [ -d "/lib/systemd/system/sysinit.target.wants" ];then cd "/lib/systemd/system/sysinit.target.wants" && rm -f $(ls | grep -v systemd-tmpfiles-setup);fi; \ - if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";bash "/root/docker/setup/07-cleanup.sh";echo "Done running the cleanup script";fi; \ + if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute /root/docker/setup/07-cleanup.sh" >&2 && exit 10; };echo "Done running the cleanup script";fi; \ echo "" RUN echo "Init done"