🗃️ Committing everything that changed 🗃️

Dockerfile.8
This commit is contained in:
casjay 2024-08-11 09:55:35 -04:00
parent e296e9968e
commit a8210fbc89
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145

View File

@ -86,14 +86,14 @@ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
RUN echo "Initializing the system"; \ RUN echo "Initializing the system"; \
$SHELL_OPTS; \ $SHELL_OPTS; \
mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ 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 script" && exit 10;};echo "Done running the init script";fi; \
echo "" echo ""
RUN echo "Creating and editing system files "; \ RUN echo "Creating and editing system files "; \
$SHELL_OPTS; \ $SHELL_OPTS; \
touch "/etc/profile" "/root/.profile"; \ touch "/etc/profile" "/root/.profile"; \
pkmgr update && pkmgr install epel-release; crb enable || true; \ 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 script" && exit 10;};echo "Done running the system script";fi; \
echo "" echo ""
RUN echo "Running pre-package commands"; \ RUN echo "Running pre-package commands"; \
@ -107,7 +107,7 @@ RUN echo "Setting up and installing packages"; \
RUN echo "Initializing packages before copying files to image"; \ RUN echo "Initializing packages before copying files to image"; \
$SHELL_OPTS; \ $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";bash "/root/docker/setup/02-packages.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the packages script";fi; \
echo "" echo ""
COPY ./rootfs/. / COPY ./rootfs/. /
@ -133,7 +133,7 @@ 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 [ -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" ] && [ -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 [ "$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";bash "/root/docker/setup/03-files.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the files script";fi; \
echo "" echo ""
RUN echo "Custom Settings"; \ RUN echo "Custom Settings"; \
@ -142,7 +142,7 @@ RUN echo "Custom Settings"; \
RUN echo "Setting up users and scripts "; \ RUN echo "Setting up users and scripts "; \
$SHELL_OPTS; \ $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";bash "/root/docker/setup/04-users.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the users script";fi; \
echo "" echo ""
RUN echo "Running the user init commands"; \ RUN echo "Running the user init commands"; \
@ -158,12 +158,12 @@ RUN echo "Custom Applications"; \
echo "" echo ""
RUN echo "Running custom commands"; \ 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";bash "/root/docker/setup/05-custom.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the custom script";fi; \
echo "" echo ""
RUN echo "Running final commands before cleanup"; \ RUN echo "Running final commands before cleanup"; \
$SHELL_OPTS; \ $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";bash "/root/docker/setup/06-post.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the post script";fi; \
echo "" echo ""
RUN echo "Deleting unneeded files"; \ RUN echo "Deleting unneeded files"; \
@ -179,7 +179,7 @@ RUN echo "Deleting unneeded files"; \
rm -rf /lib/systemd/system/sockets.target.wants/*initctl* || true; \ 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; \ 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 [ -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";bash "/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute script" && exit 10;};echo "Done running the cleanup script";fi; \
echo "" echo ""
RUN echo "Init done" RUN echo "Init done"