diff --git a/addons_updater/Dockerfile b/addons_updater/Dockerfile index fa82862dc..928467f98 100644 --- a/addons_updater/Dockerfile +++ b/addons_updater/Dockerfile @@ -38,7 +38,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -67,6 +68,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + # Entrypoint logic RUN chmod 777 /entrypoint.sh #WORKDIR / diff --git a/arpspoof/Dockerfile b/arpspoof/Dockerfile index 98f821984..e925c1003 100644 --- a/arpspoof/Dockerfile +++ b/arpspoof/Dockerfile @@ -38,7 +38,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -67,6 +68,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/autobrr/Dockerfile b/autobrr/Dockerfile index 427d31ad3..7eef15484 100644 --- a/autobrr/Dockerfile +++ b/autobrr/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -98,6 +96,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh #WORKDIR / ENTRYPOINT [ "/usr/bin/env" ] diff --git a/baikal/Dockerfile b/baikal/Dockerfile index da6fe0b4c..1f7bc3a82 100644 --- a/baikal/Dockerfile +++ b/baikal/Dockerfile @@ -65,12 +65,19 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi ################ # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + WORKDIR "/data" RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/bazarr/Dockerfile b/bazarr/Dockerfile index cedff8f3a..f902775a7 100644 --- a/bazarr/Dockerfile +++ b/bazarr/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -95,6 +93,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/binance-trading-bot/Dockerfile b/binance-trading-bot/Dockerfile index ebc6d54fa..da856e1d0 100644 --- a/binance-trading-bot/Dockerfile +++ b/binance-trading-bot/Dockerfile @@ -38,7 +38,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Install trading view ENV FLASK_APP=main.py @@ -87,6 +88,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + VOLUME [ "/data" ] WORKDIR / RUN chmod 777 /entrypoint.sh diff --git a/bitwarden/Dockerfile b/bitwarden/Dockerfile index 15d30ce83..af4cb0989 100644 --- a/bitwarden/Dockerfile +++ b/bitwarden/Dockerfile @@ -45,7 +45,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -77,6 +78,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /etc/services.d/*/* #RUN chmod 777 /entrypoint.sh diff --git a/booksonic_air/Dockerfile b/booksonic_air/Dockerfile index bd4da0653..bf2f7d911 100644 --- a/booksonic_air/Dockerfile +++ b/booksonic_air/Dockerfile @@ -53,10 +53,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -68,7 +65,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -100,6 +98,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/browserless_chrome/Dockerfile b/browserless_chrome/Dockerfile index 888159ae7..6f2ccf849 100644 --- a/browserless_chrome/Dockerfile +++ b/browserless_chrome/Dockerfile @@ -42,7 +42,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -71,6 +72,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/calibre/Dockerfile b/calibre/Dockerfile index f8715de01..631dd35bc 100644 --- a/calibre/Dockerfile +++ b/calibre/Dockerfile @@ -52,10 +52,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi # Specific images modifications RUN \ @@ -72,7 +69,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -101,6 +99,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/calibre_web/Dockerfile b/calibre_web/Dockerfile index 1bc300339..28c46fb12 100644 --- a/calibre_web/Dockerfile +++ b/calibre_web/Dockerfile @@ -57,10 +57,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi # Specific images modifications RUN \ @@ -76,7 +73,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -109,6 +107,12 @@ RUN if ! command -v sqlite3 >/dev/null 2>/dev/null; then (apt-get update && apt- # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/cloudcommander/Dockerfile b/cloudcommander/Dockerfile index 339dac50c..464c5202c 100644 --- a/cloudcommander/Dockerfile +++ b/cloudcommander/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -69,6 +70,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ENTRYPOINT [ "/entrypoint.sh" ] RUN chmod 777 /entrypoint.sh diff --git a/code-server/Dockerfile b/code-server/Dockerfile index 022260161..f86377d04 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -95,6 +93,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile index d5e65c602..cd5030776 100644 --- a/elasticsearch/Dockerfile +++ b/elasticsearch/Dockerfile @@ -50,7 +50,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -79,6 +80,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/emby/Dockerfile b/emby/Dockerfile index 9c0b7eb5c..497e724a9 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -94,6 +92,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/enedisgateway2mqtt/Dockerfile b/enedisgateway2mqtt/Dockerfile index 2c9232a94..f4152c6ab 100644 --- a/enedisgateway2mqtt/Dockerfile +++ b/enedisgateway2mqtt/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -66,6 +67,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD ["/entrypoint.sh"] diff --git a/enedisgateway2mqtt_dev/Dockerfile b/enedisgateway2mqtt_dev/Dockerfile index 3c655c323..6d5ad6efc 100644 --- a/enedisgateway2mqtt_dev/Dockerfile +++ b/enedisgateway2mqtt_dev/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -66,6 +67,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD ["/entrypoint.sh"] diff --git a/epicgamesfree/Dockerfile b/epicgamesfree/Dockerfile index 2b0720d3e..376b21019 100644 --- a/epicgamesfree/Dockerfile +++ b/epicgamesfree/Dockerfile @@ -39,7 +39,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -68,6 +69,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/filebrowser/Dockerfile b/filebrowser/Dockerfile index 2ddc22685..0b230b8bf 100644 --- a/filebrowser/Dockerfile +++ b/filebrowser/Dockerfile @@ -38,7 +38,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -68,6 +69,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + VOLUME [ "/data" ] WORKDIR / RUN chmod 777 /entrypoint.sh diff --git a/fireflyiii/Dockerfile b/fireflyiii/Dockerfile index 91ca63f5f..a8032f979 100644 --- a/fireflyiii/Dockerfile +++ b/fireflyiii/Dockerfile @@ -48,7 +48,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 90-config_yaml.sh" @@ -77,6 +78,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/fireflyiii_data_importer/Dockerfile b/fireflyiii_data_importer/Dockerfile index 9ec43f26c..46ada9ba7 100644 --- a/fireflyiii_data_importer/Dockerfile +++ b/fireflyiii_data_importer/Dockerfile @@ -44,7 +44,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 90-config_yaml.sh" @@ -73,6 +74,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/fireflyiii_fints_importer/Dockerfile b/fireflyiii_fints_importer/Dockerfile index 575f28596..82c49bca5 100644 --- a/fireflyiii_fints_importer/Dockerfile +++ b/fireflyiii_fints_importer/Dockerfile @@ -38,7 +38,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -67,6 +68,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/flaresolverr/Dockerfile b/flaresolverr/Dockerfile index efbf4d84a..ce39e671e 100644 --- a/flaresolverr/Dockerfile +++ b/flaresolverr/Dockerfile @@ -38,7 +38,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -67,6 +68,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/flexget/Dockerfile b/flexget/Dockerfile index d8eed059c..7735c1076 100644 --- a/flexget/Dockerfile +++ b/flexget/Dockerfile @@ -60,10 +60,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -75,7 +72,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -106,6 +104,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/free_games_claimer/Dockerfile b/free_games_claimer/Dockerfile index 5acd36745..fd822ca1b 100644 --- a/free_games_claimer/Dockerfile +++ b/free_games_claimer/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -66,6 +67,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN \ # Change data folder sed -i "s|/fgc|/data|g" /usr/local/bin/docker-entrypoint.sh && \ diff --git a/gazpar2mqtt/Dockerfile b/gazpar2mqtt/Dockerfile index 413feeca6..401075239 100644 --- a/gazpar2mqtt/Dockerfile +++ b/gazpar2mqtt/Dockerfile @@ -39,7 +39,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-config_yaml.sh" @@ -68,6 +69,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD ["/entrypoint.sh"] diff --git a/gitea/Dockerfile b/gitea/Dockerfile index ab83684e8..f5a7374f5 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -39,7 +39,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -70,6 +71,12 @@ EXPOSE 22 3000 # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/grav/Dockerfile b/grav/Dockerfile index ac3eb59ec..5a80dfe4e 100644 --- a/grav/Dockerfile +++ b/grav/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -98,6 +96,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/guacamole/Dockerfile b/guacamole/Dockerfile index 5f4c8dd2d..33781e4da 100644 --- a/guacamole/Dockerfile +++ b/guacamole/Dockerfile @@ -69,7 +69,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -98,6 +99,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR /data #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/immich/Dockerfile b/immich/Dockerfile index fd1ed8027..e4302df57 100644 --- a/immich/Dockerfile +++ b/immich/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi USER root @@ -84,7 +81,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -113,6 +111,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #ENTRYPOINT [ "/usr/bin/env" ] #CMD [ "/entrypoint.sh" ] diff --git a/inadyn/Dockerfile b/inadyn/Dockerfile index f75539063..d1b58cc0b 100644 --- a/inadyn/Dockerfile +++ b/inadyn/Dockerfile @@ -40,7 +40,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -91,6 +92,12 @@ RUN apk add --no-cache \ # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + WORKDIR / RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/jackett/Dockerfile b/jackett/Dockerfile index 1b9f612f8..a31bcaad2 100644 --- a/jackett/Dockerfile +++ b/jackett/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi # Changes config directory ENV XDG_CONFIG_HOME="/config/addons_config" @@ -68,7 +65,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -97,6 +95,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile index a3fda3a2f..3820739e6 100644 --- a/jellyfin/Dockerfile +++ b/jellyfin/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi RUN \ sed -i "s|contenv bash|contenv bashio|g" /etc/s6-overlay/s6-rc.d/svc-jellyfin/run && \ @@ -73,7 +70,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -102,6 +100,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/jellyseerr/Dockerfile b/jellyseerr/Dockerfile index 9a1455f89..787e14c5a 100644 --- a/jellyseerr/Dockerfile +++ b/jellyseerr/Dockerfile @@ -45,7 +45,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -74,6 +75,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/joal/Dockerfile b/joal/Dockerfile index cb432bb5a..97c7a9cb4 100644 --- a/joal/Dockerfile +++ b/joal/Dockerfile @@ -49,7 +49,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Manual apps ENV PACKAGES="jq \ @@ -79,6 +80,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/joplin/Dockerfile b/joplin/Dockerfile index f4094729d..efe896a4c 100644 --- a/joplin/Dockerfile +++ b/joplin/Dockerfile @@ -44,7 +44,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -73,6 +74,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/lidarr/Dockerfile b/lidarr/Dockerfile index d340efd12..cb15b7cbb 100644 --- a/lidarr/Dockerfile +++ b/lidarr/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -97,6 +95,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/mealie/Dockerfile b/mealie/Dockerfile index 08c0fe9e0..de7200fde 100644 --- a/mealie/Dockerfile +++ b/mealie/Dockerfile @@ -45,7 +45,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -74,6 +75,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN \ # Add custom instructions to run.sh on armv7 sed -i '1d' /app/run.sh \ diff --git a/mylar3/Dockerfile b/mylar3/Dockerfile index 38880f9a8..4b6e502c8 100644 --- a/mylar3/Dockerfile +++ b/mylar3/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -94,6 +92,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 14f98f4bd..c88f64901 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -82,10 +82,7 @@ RUN \ && for file in /etc/services.d/*/* /etc/cont-init.d/* /etc/s6-overlay/s6-rc.d/*/*;do if [ -f $file ] && [[ ! -z $(awk '/chown.*abc:abc.*\\/,/.*\/config( |$)/{print FILENAME}' $file) ]] ; then sed -i "s|/config$|/data|g" $file; fi ;done \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -97,7 +94,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -128,6 +126,12 @@ VOLUME ["/share", "/ssl", "/data", "/media"] # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + # Correct modifications ARG CONFIGLOCATION="/www/nextcloud/config" # hadolint ignore=SC2015, SC2013, SC2086, SC2016 diff --git a/nzbget/Dockerfile b/nzbget/Dockerfile index 3cbfc0ea0..8f79d0259 100644 --- a/nzbget/Dockerfile +++ b/nzbget/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -94,6 +92,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/omada/Dockerfile b/omada/Dockerfile index 3c4357228..3238905b3 100644 --- a/omada/Dockerfile +++ b/omada/Dockerfile @@ -45,7 +45,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -74,6 +75,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #ENTRYPOINT [ "/usr/bin/env" ] #CMD [ "/entrypoint.sh" ] diff --git a/omada_v3/Dockerfile b/omada_v3/Dockerfile index 6f570eb96..d4eefb7de 100644 --- a/omada_v3/Dockerfile +++ b/omada_v3/Dockerfile @@ -46,7 +46,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -75,6 +76,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #ENTRYPOINT [ "/usr/bin/env" ] #CMD [ "/entrypoint.sh" ] diff --git a/ombi/Dockerfile b/ombi/Dockerfile index c51b8c4e3..35aa653a7 100644 --- a/ombi/Dockerfile +++ b/ombi/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -94,6 +92,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/organizr/Dockerfile b/organizr/Dockerfile index 360afd99e..21cd588ae 100644 --- a/organizr/Dockerfile +++ b/organizr/Dockerfile @@ -49,10 +49,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -64,7 +61,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -94,6 +92,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/overseerr/Dockerfile b/overseerr/Dockerfile index 2a9588bbb..09a40740c 100644 --- a/overseerr/Dockerfile +++ b/overseerr/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -95,6 +93,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/paperless_ngx/Dockerfile b/paperless_ngx/Dockerfile index d222497e1..6daf9497b 100644 --- a/paperless_ngx/Dockerfile +++ b/paperless_ngx/Dockerfile @@ -42,7 +42,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh 90-config_yaml.sh" @@ -71,6 +72,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh #WORKDIR / ENTRYPOINT [ "/usr/bin/env" ] diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 8a086c41a..d1e3d45f0 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -57,10 +57,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -72,7 +69,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-smb_mounts.sh" @@ -104,6 +102,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/photoprism/Dockerfile b/photoprism/Dockerfile index dea98669a..2570202b6 100644 --- a/photoprism/Dockerfile +++ b/photoprism/Dockerfile @@ -44,7 +44,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 90-config_yaml.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -78,6 +79,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/piwigo/Dockerfile b/piwigo/Dockerfile index 378f7bb80..4832e8d11 100644 --- a/piwigo/Dockerfile +++ b/piwigo/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -96,6 +94,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + # hadolint ignore=SC2013 RUN \ for file in $(grep -Esril "/local/config/addons_config/piwigo" /etc /defaults); do sed -i "s=/local/config/addons_config/piwigo=/local/config=g" "$file"; done diff --git a/plex/Dockerfile b/plex/Dockerfile index 3f626f752..06e7d90c9 100644 --- a/plex/Dockerfile +++ b/plex/Dockerfile @@ -59,10 +59,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## @@ -75,7 +72,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -106,6 +104,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/plex_meta_manager/Dockerfile b/plex_meta_manager/Dockerfile index b0b6da4ee..05b1bfc68 100644 --- a/plex_meta_manager/Dockerfile +++ b/plex_meta_manager/Dockerfile @@ -58,10 +58,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -73,7 +70,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -102,6 +100,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/portainer/Dockerfile b/portainer/Dockerfile index 5f7205603..ace82dfd6 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -60,7 +60,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -89,6 +90,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /etc/services.d/*/* #RUN chmod 777 /entrypoint.sh #WORKDIR / diff --git a/portainer_agent/Dockerfile b/portainer_agent/Dockerfile index 3f1f3581a..23b6e4b91 100644 --- a/portainer_agent/Dockerfile +++ b/portainer_agent/Dockerfile @@ -46,7 +46,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -75,6 +76,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod a+x /usr/sbin/healthcheck && \ chmod a+x /usr/sbin/wait-for-signal WORKDIR "/app" diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 19f8468da..bc1d021b6 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -42,7 +42,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -71,6 +72,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh WORKDIR /data ENTRYPOINT [ "/usr/bin/env" ] diff --git a/prowlarr/Dockerfile b/prowlarr/Dockerfile index 2900a937a..2bf65cdeb 100644 --- a/prowlarr/Dockerfile +++ b/prowlarr/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -97,6 +95,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index 546f215f8..497f4acfe 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -79,10 +79,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -126,12 +123,19 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi ################ # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/radarr/Dockerfile b/radarr/Dockerfile index b72e34af6..5a2aa4e16 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -98,6 +96,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/readarr/Dockerfile b/readarr/Dockerfile index 65dcb22c1..a4aa4abe0 100644 --- a/readarr/Dockerfile +++ b/readarr/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -95,6 +93,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/requestrr/Dockerfile b/requestrr/Dockerfile index e9dfe1400..0ff25651d 100644 --- a/requestrr/Dockerfile +++ b/requestrr/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -97,6 +95,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/resiliosync/Dockerfile b/resiliosync/Dockerfile index 9a9ce959d..596fd6435 100644 --- a/resiliosync/Dockerfile +++ b/resiliosync/Dockerfile @@ -69,10 +69,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -84,7 +81,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -117,6 +115,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/sabnzbd/Dockerfile b/sabnzbd/Dockerfile index 4e8eefefb..f91b9b24e 100644 --- a/sabnzbd/Dockerfile +++ b/sabnzbd/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -65,7 +62,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -94,6 +92,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/scrutiny/Dockerfile b/scrutiny/Dockerfile index be62754c0..8a4efd5e6 100644 --- a/scrutiny/Dockerfile +++ b/scrutiny/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -69,6 +70,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ diff --git a/scrutiny_fa/Dockerfile b/scrutiny_fa/Dockerfile index be62754c0..8a4efd5e6 100644 --- a/scrutiny_fa/Dockerfile +++ b/scrutiny_fa/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -69,6 +70,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ diff --git a/seafile/Dockerfile b/seafile/Dockerfile index 838d2af73..777fbaebe 100644 --- a/seafile/Dockerfile +++ b/seafile/Dockerfile @@ -42,7 +42,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-config_yaml.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -71,6 +72,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index 6717b82df..50fac6759 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -51,10 +51,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -66,7 +63,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -98,6 +96,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/sponsorblockcast/Dockerfile b/sponsorblockcast/Dockerfile index 686b5c88e..3ac557add 100644 --- a/sponsorblockcast/Dockerfile +++ b/sponsorblockcast/Dockerfile @@ -34,7 +34,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -63,6 +64,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + # Entrypoint logic RUN chmod 777 /entrypoint.sh #WORKDIR / diff --git a/spotweb/Dockerfile b/spotweb/Dockerfile index a91c32f7f..ef7143cb0 100644 --- a/spotweb/Dockerfile +++ b/spotweb/Dockerfile @@ -95,7 +95,8 @@ RUN if [ -d /app ]; then chown -R nginx /app; fi # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="01-custom_script.sh" @@ -124,6 +125,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/tandoor_recipes/Dockerfile b/tandoor_recipes/Dockerfile index 37bae5bc8..0971a6a8b 100644 --- a/tandoor_recipes/Dockerfile +++ b/tandoor_recipes/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -65,6 +66,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh #WORKDIR /data/recipes ENTRYPOINT [ "/usr/bin/env" ] diff --git a/tdarr/Dockerfile b/tdarr/Dockerfile index 49f51e437..1cb080a34 100644 --- a/tdarr/Dockerfile +++ b/tdarr/Dockerfile @@ -37,7 +37,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -66,6 +67,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/teamspeak/Dockerfile b/teamspeak/Dockerfile index 5fa300d15..9990c88cb 100644 --- a/teamspeak/Dockerfile +++ b/teamspeak/Dockerfile @@ -43,7 +43,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -72,6 +73,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/transmission/Dockerfile b/transmission/Dockerfile index b41683072..bbf8cf7bc 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -60,10 +60,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "2a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods && chmod +x /docker-mods ; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -75,7 +72,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-dns_set.sh 00-local_mounts.sh 00-smb_mounts.sh " @@ -104,6 +102,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/transmission_openvpn/Dockerfile b/transmission_openvpn/Dockerfile index 6c5f56f6e..0b5c33c26 100644 --- a/transmission_openvpn/Dockerfile +++ b/transmission_openvpn/Dockerfile @@ -55,10 +55,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -70,7 +67,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-dns_set.sh 00-local_mounts.sh 00-smb_mounts.sh " @@ -99,6 +97,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh CMD [ "/entrypoint.sh" ] SHELL ["/bin/bash", "-o", "pipefail", "-c"] diff --git a/ubooquity/Dockerfile b/ubooquity/Dockerfile index 142973fa1..f33d11e34 100644 --- a/ubooquity/Dockerfile +++ b/ubooquity/Dockerfile @@ -60,10 +60,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -75,7 +72,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -107,6 +105,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/unpackerr/Dockerfile b/unpackerr/Dockerfile index 0a68301e0..278dba384 100644 --- a/unpackerr/Dockerfile +++ b/unpackerr/Dockerfile @@ -50,10 +50,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -87,12 +84,19 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi ################ # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + ############ # 5 Labels # ############ diff --git a/webtop_kde/Dockerfile b/webtop_kde/Dockerfile index 1df184c1c..5c90b8d84 100644 --- a/webtop_kde/Dockerfile +++ b/webtop_kde/Dockerfile @@ -60,10 +60,7 @@ RUN \ #&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \ \ # Replace lsiown if not found - && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi \ - \ - # Add entrypoint if existing - && if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then chmod +x /entrypoint.sh && sed -i "1a /./entrypoint.sh" /docker-mods; fi + && if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi ################## # 3 Install apps # @@ -75,7 +72,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh 90-dns_set.sh" @@ -104,6 +102,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index 72413fb45..79923fc98 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -48,7 +48,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 90-config_yaml.sh 00-local_mounts.sh 00-smb_mounts.sh" @@ -79,6 +80,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/wger/Dockerfile b/wger/Dockerfile index b5b3e7f7f..61c132cf4 100644 --- a/wger/Dockerfile +++ b/wger/Dockerfile @@ -71,6 +71,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh USER wger #CMD [ "/entrypoint.sh" ] diff --git a/whoogle/Dockerfile b/whoogle/Dockerfile index 1277986fb..acca9e40c 100644 --- a/whoogle/Dockerfile +++ b/whoogle/Dockerfile @@ -42,7 +42,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" @@ -71,6 +72,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] diff --git a/xteve/Dockerfile b/xteve/Dockerfile index f6182cc2e..92ba2be5e 100644 --- a/xteve/Dockerfile +++ b/xteve/Dockerfile @@ -42,7 +42,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -71,6 +72,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/zoneminder/Dockerfile b/zoneminder/Dockerfile index 3cefb0179..a520c0e7d 100644 --- a/zoneminder/Dockerfile +++ b/zoneminder/Dockerfile @@ -47,7 +47,8 @@ COPY rootfs/ / # Corrects permissions for s6 v3 RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi # Modules ARG MODULES="00-banner.sh 01-custom_script.sh" @@ -76,6 +77,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # 4 Entrypoint # ################ +# Corrects permissions for s6 v3 +RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi && \ + if [ -f /docker-mods ] && [ -f /entrypoint.sh ]; then sed -i "1a /./entrypoint.sh" /docker-mods; fi + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ]