From f79352608dfca73d870f43917d9113d9c70dad5a Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 9 Sep 2023 19:17:08 +0200 Subject: [PATCH] External modules script --- .templates/ha_automodules.sh | 33 ++++++++++++++++++++++++++++ .templates/{ha_lsio => ha_lsio.sh} | 8 +++++-- addons_updater/Dockerfile | 8 ++----- arpspoof/Dockerfile | 8 ++----- autobrr/Dockerfile | 10 +++------ baikal/Dockerfile | 8 ++----- bazarr/Dockerfile | 10 +++------ binance-trading-bot/Dockerfile | 8 ++----- bitwarden/Dockerfile | 8 ++----- booksonic_air/Dockerfile | 10 +++------ browserless_chrome/Dockerfile | 8 ++----- calibre/Dockerfile | 10 +++------ calibre_web/Dockerfile | 10 +++------ cloudcommander/Dockerfile | 8 ++----- code-server/Dockerfile | 10 +++------ elasticsearch/Dockerfile | 8 ++----- emby/Dockerfile | 10 +++------ enedisgateway2mqtt/Dockerfile | 8 ++----- enedisgateway2mqtt_dev/Dockerfile | 8 ++----- epicgamesfree/Dockerfile | 8 ++----- filebrowser/Dockerfile | 8 ++----- fireflyiii/Dockerfile | 8 ++----- fireflyiii_data_importer/Dockerfile | 8 ++----- fireflyiii_fints_importer/Dockerfile | 8 ++----- flaresolverr/Dockerfile | 8 ++----- flexget/Dockerfile | 10 +++------ free_games_claimer/Dockerfile | 8 ++----- gazpar2mqtt/Dockerfile | 8 ++----- gitea/Dockerfile | 8 ++----- grav/Dockerfile | 10 +++------ guacamole/Dockerfile | 8 ++----- immich/Dockerfile | 10 +++------ inadyn/Dockerfile | 8 ++----- jackett/Dockerfile | 10 +++------ jellyfin/Dockerfile | 10 +++------ jellyseerr/Dockerfile | 10 +++------ joal/Dockerfile | 8 ++----- joplin/Dockerfile | 8 ++----- lidarr/Dockerfile | 10 +++------ mealie/Dockerfile | 8 ++----- mylar3/Dockerfile | 10 +++------ nextcloud/Dockerfile | 10 +++------ nzbget/Dockerfile | 10 +++------ omada/Dockerfile | 8 ++----- omada_v3/Dockerfile | 8 ++----- ombi/Dockerfile | 10 +++------ organizr/Dockerfile | 10 +++------ overseerr/Dockerfile | 10 +++------ paperless_ngx/Dockerfile | 8 ++----- papermerge/Dockerfile | 10 +++------ photoprism/Dockerfile | 8 ++----- piwigo/Dockerfile | 10 +++------ plex/Dockerfile | 10 +++------ plex_meta_manager/Dockerfile | 10 +++------ portainer/Dockerfile | 8 ++----- portainer_agent/Dockerfile | 8 ++----- postgres/Dockerfile | 8 ++----- prowlarr/Dockerfile | 10 +++------ qbittorrent/Dockerfile | 10 +++------ radarr/Dockerfile | 10 +++------ readarr/Dockerfile | 10 +++------ requestrr/Dockerfile | 10 +++------ resiliosync/Dockerfile | 10 +++------ sabnzbd/Dockerfile | 10 +++------ scrutiny/Dockerfile | 8 ++----- scrutiny_fa/Dockerfile | 8 ++----- seafile/Dockerfile | 8 ++----- sonarr/Dockerfile | 10 +++------ sponsorblockcast/Dockerfile | 8 ++----- spotweb/Dockerfile | 8 ++----- tandoor_recipes/Dockerfile | 8 ++----- tdarr/Dockerfile | 8 ++----- teamspeak/Dockerfile | 8 ++----- transmission/Dockerfile | 10 +++------ transmission_openvpn/Dockerfile | 10 +++------ ubooquity/Dockerfile | 10 +++------ unpackerr/Dockerfile | 10 +++------ webtop_kde/Dockerfile | 10 +++------ webtrees/Dockerfile | 8 ++----- wger/Dockerfile | 8 ++----- whoogle/Dockerfile | 8 ++----- xteve/Dockerfile | 8 ++----- zoneminder/Dockerfile | 8 ++----- 83 files changed, 238 insertions(+), 525 deletions(-) create mode 100644 .templates/ha_automodules.sh rename .templates/{ha_lsio => ha_lsio.sh} (84%) diff --git a/.templates/ha_automodules.sh b/.templates/ha_automodules.sh new file mode 100644 index 000000000..b8752752c --- /dev/null +++ b/.templates/ha_automodules.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# shellcheck disable=SC2015 + +############################## +# Automatic modules download # +############################## + +MODULES="$1" + +# Install bash if not available +if ! command -v bash >/dev/null 2>/dev/null; then + (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null +fi + +# Install curl if not available +if ! command -v curl >/dev/null 2>/dev/null; then + (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null +fi + +# Install ca-certificates if not available +apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true + +# Create folder for scripts +mkdir -p /etc/cont-init.d + +# Download scripts +for scripts in $MODULES; do + echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && + [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || + (echo "script failed to install $scripts" && exit 1) +done + +chmod -R 755 /etc/cont-init.d diff --git a/.templates/ha_lsio b/.templates/ha_lsio.sh similarity index 84% rename from .templates/ha_lsio rename to .templates/ha_lsio.sh index 9b0c81d1b..2f0e310eb 100644 --- a/.templates/ha_lsio +++ b/.templates/ha_lsio.sh @@ -1,5 +1,9 @@ #!/bin/sh -# shellcheck disable=SC2086, SC2015, SC2013, SC2086 +# shellcheck disable=SC2013,SC2016,SC2236 + +############################# +# Modify global lsio images # +############################# # Set variable CONFIGLOCATION="$1" @@ -28,7 +32,7 @@ done # Avoid chmod /config 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 + if [ -f "$file" ] && [ ! -z "$(awk '/chown.*abc:abc.*\\/,/.*\/config( |$)/{print FILENAME}' "$file")" ]; then sed -i "s|/config$|/data|g" "$file" fi done diff --git a/addons_updater/Dockerfile b/addons_updater/Dockerfile index ed2ef4303..e886a5ef5 100644 --- a/addons_updater/Dockerfile +++ b/addons_updater/Dockerfile @@ -40,12 +40,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/arpspoof/Dockerfile b/arpspoof/Dockerfile index 11a79f920..f394bb67b 100644 --- a/arpspoof/Dockerfile +++ b/arpspoof/Dockerfile @@ -40,12 +40,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq curl iproute2" diff --git a/autobrr/Dockerfile b/autobrr/Dockerfile index d3378e563..031a4bec3 100644 --- a/autobrr/Dockerfile +++ b/autobrr/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/autobrr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/baikal/Dockerfile b/baikal/Dockerfile index f04c49ca3..5f3449e2a 100644 --- a/baikal/Dockerfile +++ b/baikal/Dockerfile @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ARG PACKAGES="" diff --git a/bazarr/Dockerfile b/bazarr/Dockerfile index 7d6f33ca0..d680f0b8c 100644 --- a/bazarr/Dockerfile +++ b/bazarr/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/bazarr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/binance-trading-bot/Dockerfile b/binance-trading-bot/Dockerfile index c70df6b0b..6f91c2878 100644 --- a/binance-trading-bot/Dockerfile +++ b/binance-trading-bot/Dockerfile @@ -60,12 +60,8 @@ RUN \ ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="sudo redis nginx" diff --git a/bitwarden/Dockerfile b/bitwarden/Dockerfile index 5ac155aa4..90bb8ae3f 100644 --- a/bitwarden/Dockerfile +++ b/bitwarden/Dockerfile @@ -47,12 +47,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="libmariadb-dev-compat \ diff --git a/booksonic_air/Dockerfile b/booksonic_air/Dockerfile index b08b005da..1e16879cd 100644 --- a/booksonic_air/Dockerfile +++ b/booksonic_air/Dockerfile @@ -34,7 +34,7 @@ ENV BOOKSONIC_AIR_SETTINGS="/data" # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/data" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -47,12 +47,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/browserless_chrome/Dockerfile b/browserless_chrome/Dockerfile index bb767deb8..2b20dffc8 100644 --- a/browserless_chrome/Dockerfile +++ b/browserless_chrome/Dockerfile @@ -41,12 +41,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/calibre/Dockerfile b/calibre/Dockerfile index 583dffe75..1e58c7881 100644 --- a/calibre/Dockerfile +++ b/calibre/Dockerfile @@ -40,7 +40,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/calibre" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -53,12 +53,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/calibre_web/Dockerfile b/calibre_web/Dockerfile index 75000345b..b5f1fdb14 100644 --- a/calibre_web/Dockerfile +++ b/calibre_web/Dockerfile @@ -38,7 +38,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/calibre-web" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh # Specific images modifications RUN \ @@ -55,12 +55,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="libnss3 libxtst6 libxrandr2" diff --git a/cloudcommander/Dockerfile b/cloudcommander/Dockerfile index fae824eb9..e3b6e55ae 100644 --- a/cloudcommander/Dockerfile +++ b/cloudcommander/Dockerfile @@ -38,12 +38,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/code-server/Dockerfile b/code-server/Dockerfile index c830aac10..028adf059 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/data" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq" diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile index 321c4f8b8..9291e7aa3 100644 --- a/elasticsearch/Dockerfile +++ b/elasticsearch/Dockerfile @@ -52,12 +52,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/emby/Dockerfile b/emby/Dockerfile index c3a25f818..55812e9da 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/emby" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/enedisgateway2mqtt/Dockerfile b/enedisgateway2mqtt/Dockerfile index aaf26ecfe..980d7d837 100644 --- a/enedisgateway2mqtt/Dockerfile +++ b/enedisgateway2mqtt/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx yamllint" diff --git a/enedisgateway2mqtt_dev/Dockerfile b/enedisgateway2mqtt_dev/Dockerfile index 3d0680bc5..e271c70b0 100644 --- a/enedisgateway2mqtt_dev/Dockerfile +++ b/enedisgateway2mqtt_dev/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx yamllint" diff --git a/epicgamesfree/Dockerfile b/epicgamesfree/Dockerfile index c0b0722d6..139825633 100644 --- a/epicgamesfree/Dockerfile +++ b/epicgamesfree/Dockerfile @@ -41,12 +41,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/filebrowser/Dockerfile b/filebrowser/Dockerfile index 81f1d77a8..29abc94e6 100644 --- a/filebrowser/Dockerfile +++ b/filebrowser/Dockerfile @@ -40,12 +40,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="bind-tools \ diff --git a/fireflyiii/Dockerfile b/fireflyiii/Dockerfile index 741af0bc8..625b1bc6b 100644 --- a/fireflyiii/Dockerfile +++ b/fireflyiii/Dockerfile @@ -50,12 +50,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 90-config_yaml.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="cron mariadb-client" diff --git a/fireflyiii_data_importer/Dockerfile b/fireflyiii_data_importer/Dockerfile index 5ce178f49..5e458136d 100644 --- a/fireflyiii_data_importer/Dockerfile +++ b/fireflyiii_data_importer/Dockerfile @@ -46,12 +46,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 90-config_yaml.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="cron" diff --git a/fireflyiii_fints_importer/Dockerfile b/fireflyiii_fints_importer/Dockerfile index 51a3c6a00..778508a1a 100644 --- a/fireflyiii_fints_importer/Dockerfile +++ b/fireflyiii_fints_importer/Dockerfile @@ -40,12 +40,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="apk-cron" diff --git a/flaresolverr/Dockerfile b/flaresolverr/Dockerfile index ed3304376..8557bf1e7 100644 --- a/flaresolverr/Dockerfile +++ b/flaresolverr/Dockerfile @@ -40,12 +40,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/flexget/Dockerfile b/flexget/Dockerfile index 714c4ff1c..baddec6d3 100644 --- a/flexget/Dockerfile +++ b/flexget/Dockerfile @@ -41,7 +41,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/flexget" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -54,12 +54,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/free_games_claimer/Dockerfile b/free_games_claimer/Dockerfile index bbc55158f..bf48614e7 100644 --- a/free_games_claimer/Dockerfile +++ b/free_games_claimer/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/gazpar2mqtt/Dockerfile b/gazpar2mqtt/Dockerfile index aeb068f65..5360b23bd 100644 --- a/gazpar2mqtt/Dockerfile +++ b/gazpar2mqtt/Dockerfile @@ -41,12 +41,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-config_yaml.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 66411242b..096a768ab 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -41,12 +41,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/grav/Dockerfile b/grav/Dockerfile index 1083f8cfb..12cd60e24 100644 --- a/grav/Dockerfile +++ b/grav/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/share/grav" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/guacamole/Dockerfile b/guacamole/Dockerfile index 5f8ee0d6a..68e2a138c 100644 --- a/guacamole/Dockerfile +++ b/guacamole/Dockerfile @@ -71,12 +71,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/immich/Dockerfile b/immich/Dockerfile index 4928ab30d..c696742b1 100644 --- a/immich/Dockerfile +++ b/immich/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/immich" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh USER root @@ -62,12 +62,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="sudo redis-server yamllint pip libxml2-dev libxslt-dev libjpeg-dev zlib1g-dev build-essential" diff --git a/inadyn/Dockerfile b/inadyn/Dockerfile index 84a7c484a..c0ead1efd 100644 --- a/inadyn/Dockerfile +++ b/inadyn/Dockerfile @@ -42,12 +42,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="curl \ diff --git a/jackett/Dockerfile b/jackett/Dockerfile index 1bd471343..826f6c84f 100644 --- a/jackett/Dockerfile +++ b/jackett/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/Jackett" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh # Changes config directory ENV XDG_CONFIG_HOME="/config/addons_config" @@ -46,12 +46,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="curl" diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile index 6821dac03..a5d7ccee9 100644 --- a/jellyfin/Dockerfile +++ b/jellyfin/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=0 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh RUN \ sed -i "s|contenv bash|contenv bashio|g" /etc/s6-overlay/s6-rc.d/svc-jellyfin/run && \ @@ -51,12 +51,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/jellyseerr/Dockerfile b/jellyseerr/Dockerfile index 0b293d823..506f1e261 100644 --- a/jellyseerr/Dockerfile +++ b/jellyseerr/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/jellyseerr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh # Avoid custom-init.d duplications ARG CONFIGLOCATION="/config/addons_config/jellyseerr" @@ -49,12 +49,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/joal/Dockerfile b/joal/Dockerfile index 823afeebd..191ad0c56 100644 --- a/joal/Dockerfile +++ b/joal/Dockerfile @@ -64,12 +64,8 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh ################ # 4 Entrypoint # diff --git a/joplin/Dockerfile b/joplin/Dockerfile index 37a7369ab..5e0e74a45 100644 --- a/joplin/Dockerfile +++ b/joplin/Dockerfile @@ -46,12 +46,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="procps" diff --git a/lidarr/Dockerfile b/lidarr/Dockerfile index b9a0657b0..2202ad560 100644 --- a/lidarr/Dockerfile +++ b/lidarr/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/lidarr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/mealie/Dockerfile b/mealie/Dockerfile index e9f57d301..ac4610e3a 100644 --- a/mealie/Dockerfile +++ b/mealie/Dockerfile @@ -47,12 +47,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/mylar3/Dockerfile b/mylar3/Dockerfile index 69a7bbf2f..29a7655dc 100644 --- a/mylar3/Dockerfile +++ b/mylar3/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/data" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index c660a1145..42f990f25 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -54,7 +54,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/data/config" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -67,12 +67,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="gcompat" diff --git a/nzbget/Dockerfile b/nzbget/Dockerfile index e053c2295..8098ca027 100644 --- a/nzbget/Dockerfile +++ b/nzbget/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/nzbget" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/omada/Dockerfile b/omada/Dockerfile index 189c7bb97..5ef125da6 100644 --- a/omada/Dockerfile +++ b/omada/Dockerfile @@ -47,12 +47,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/omada_v3/Dockerfile b/omada_v3/Dockerfile index 7b9ef7fc5..f8116ec92 100644 --- a/omada_v3/Dockerfile +++ b/omada_v3/Dockerfile @@ -48,12 +48,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/ombi/Dockerfile b/ombi/Dockerfile index 2d4419818..e594542a3 100644 --- a/ombi/Dockerfile +++ b/ombi/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/ombi" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq curl" diff --git a/organizr/Dockerfile b/organizr/Dockerfile index 3241083bb..1fcb2431c 100644 --- a/organizr/Dockerfile +++ b/organizr/Dockerfile @@ -29,7 +29,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/data/organizr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -42,12 +42,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="curl \ diff --git a/overseerr/Dockerfile b/overseerr/Dockerfile index 3f895778a..5b2816bd0 100644 --- a/overseerr/Dockerfile +++ b/overseerr/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/overseerr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/paperless_ngx/Dockerfile b/paperless_ngx/Dockerfile index 4af89eae9..5d9df98ef 100644 --- a/paperless_ngx/Dockerfile +++ b/paperless_ngx/Dockerfile @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh 90-config_yaml.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="redis-server yamllint pip libxml2-dev libxslt-dev python-dev libjpeg-dev zlib1g-dev python3-dev build-essential nginx" diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 18ec1af23..f6a19128c 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -38,7 +38,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -51,12 +51,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/photoprism/Dockerfile b/photoprism/Dockerfile index 805ff550a..7b2e864ac 100644 --- a/photoprism/Dockerfile +++ b/photoprism/Dockerfile @@ -46,12 +46,8 @@ COPY rootfs/ / 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" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/piwigo/Dockerfile b/piwigo/Dockerfile index b695b9e29..031612445 100644 --- a/piwigo/Dockerfile +++ b/piwigo/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/piwigo" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/plex/Dockerfile b/plex/Dockerfile index 20ef725d0..bff7b63b1 100644 --- a/plex/Dockerfile +++ b/plex/Dockerfile @@ -40,7 +40,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## @@ -54,12 +54,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/plex_meta_manager/Dockerfile b/plex_meta_manager/Dockerfile index bce19446a..00f5dd60d 100644 --- a/plex_meta_manager/Dockerfile +++ b/plex_meta_manager/Dockerfile @@ -39,7 +39,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/plex-meta-manager" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -52,12 +52,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/portainer/Dockerfile b/portainer/Dockerfile index 88ef76a73..c155e5317 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -62,12 +62,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/portainer_agent/Dockerfile b/portainer_agent/Dockerfile index 43fae2c5b..fdd9d3ab4 100644 --- a/portainer_agent/Dockerfile +++ b/portainer_agent/Dockerfile @@ -48,12 +48,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 403018ddb..a697e907f 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/prowlarr/Dockerfile b/prowlarr/Dockerfile index 1cebb6179..8644a132b 100644 --- a/prowlarr/Dockerfile +++ b/prowlarr/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/prowlarr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index faabb6389..528b58581 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -60,7 +60,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/qBittorrent" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -72,12 +72,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh 90-dns_set.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh #RUN if [ -f /etc/s6-overlay/s6-rc.d/init-adduser ]; then for SCRIPTS in /etc/cont-init.d/*; do [ -e "$SCRIPTS" ] || continue \ # && mkdir -p /abscripts && sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" \ diff --git a/radarr/Dockerfile b/radarr/Dockerfile index 43c409fb9..067f4801b 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/radarr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV BASHIO_VERSION=0.14.3 diff --git a/readarr/Dockerfile b/readarr/Dockerfile index f0273d3ef..7cade339d 100644 --- a/readarr/Dockerfile +++ b/readarr/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/readarr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/requestrr/Dockerfile b/requestrr/Dockerfile index 3cb8f3032..db472629e 100644 --- a/requestrr/Dockerfile +++ b/requestrr/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/data" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/resiliosync/Dockerfile b/resiliosync/Dockerfile index e7e7901e8..e755cd962 100644 --- a/resiliosync/Dockerfile +++ b/resiliosync/Dockerfile @@ -50,7 +50,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/share/resiliosync_config" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -63,12 +63,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/sabnzbd/Dockerfile b/sabnzbd/Dockerfile index 23ae0a85e..88949e0d9 100644 --- a/sabnzbd/Dockerfile +++ b/sabnzbd/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/sabnzbd" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -43,12 +43,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/scrutiny/Dockerfile b/scrutiny/Dockerfile index 7a1ced426..4506f123e 100644 --- a/scrutiny/Dockerfile +++ b/scrutiny/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/scrutiny_fa/Dockerfile b/scrutiny_fa/Dockerfile index 7a1ced426..4506f123e 100644 --- a/scrutiny_fa/Dockerfile +++ b/scrutiny_fa/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/seafile/Dockerfile b/seafile/Dockerfile index 9cbd52914..9ac9441f6 100644 --- a/seafile/Dockerfile +++ b/seafile/Dockerfile @@ -44,12 +44,8 @@ COPY rootfs/ / 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" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index 3fe1a86f8..8f973f54f 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -31,7 +31,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/sonarr" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-disable_ingress.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/sponsorblockcast/Dockerfile b/sponsorblockcast/Dockerfile index 364b95975..55f276378 100644 --- a/sponsorblockcast/Dockerfile +++ b/sponsorblockcast/Dockerfile @@ -41,12 +41,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/spotweb/Dockerfile b/spotweb/Dockerfile index e63776fc9..561e06944 100644 --- a/spotweb/Dockerfile +++ b/spotweb/Dockerfile @@ -97,12 +97,8 @@ RUN if [ -d /app ]; then chown -R nginx /app; fi ARG MODULES="01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/tandoor_recipes/Dockerfile b/tandoor_recipes/Dockerfile index 7b6772122..c15460a31 100644 --- a/tandoor_recipes/Dockerfile +++ b/tandoor_recipes/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx mysql-client" diff --git a/tdarr/Dockerfile b/tdarr/Dockerfile index bd900e529..06056fe9c 100644 --- a/tdarr/Dockerfile +++ b/tdarr/Dockerfile @@ -39,12 +39,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="libgles2-mesa libgles2-mesa-dev xorg-dev" diff --git a/teamspeak/Dockerfile b/teamspeak/Dockerfile index 969d44475..7b41bef49 100644 --- a/teamspeak/Dockerfile +++ b/teamspeak/Dockerfile @@ -45,12 +45,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/transmission/Dockerfile b/transmission/Dockerfile index a14628124..cb0ff4125 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -41,7 +41,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/transmission" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -54,12 +54,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-dns_set.sh 00-local_mounts.sh 00-smb_mounts.sh " # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/transmission_openvpn/Dockerfile b/transmission_openvpn/Dockerfile index 9079c3dee..88e7508b8 100644 --- a/transmission_openvpn/Dockerfile +++ b/transmission_openvpn/Dockerfile @@ -36,7 +36,7 @@ ENV CREATE_TUN_DEVICE=false \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/transmission_openvpn" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -49,12 +49,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-dns_set.sh 00-local_mounts.sh 00-smb_mounts.sh " # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx" diff --git a/ubooquity/Dockerfile b/ubooquity/Dockerfile index 920761c91..1815f58cb 100644 --- a/ubooquity/Dockerfile +++ b/ubooquity/Dockerfile @@ -41,7 +41,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config/addons_config/ubooquity" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -54,12 +54,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="curl \ diff --git a/unpackerr/Dockerfile b/unpackerr/Dockerfile index deac1dff8..130beaaf9 100644 --- a/unpackerr/Dockerfile +++ b/unpackerr/Dockerfile @@ -30,7 +30,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/config" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -42,12 +42,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ARG PACKAGES="" diff --git a/webtop_kde/Dockerfile b/webtop_kde/Dockerfile index e019c55ce..c6116bd76 100644 --- a/webtop_kde/Dockerfile +++ b/webtop_kde/Dockerfile @@ -40,7 +40,7 @@ RUN \ # Global LSIO modifications ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ARG CONFIGLOCATION="/share/webtop_kde" -RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi +RUN if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## # 3 Install apps # @@ -53,12 +53,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh 90-dns_set.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="nginx engrampa" diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index 0dc9f7c0c..cd756a063 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -50,12 +50,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-config_yaml.sh 00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="jq \ diff --git a/wger/Dockerfile b/wger/Dockerfile index 51914ee51..284b5979a 100644 --- a/wger/Dockerfile +++ b/wger/Dockerfile @@ -50,12 +50,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 90-config_yaml.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d || printf '%s\n' "${MODULES}" >/MODULESFILE +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="sudo nginx" diff --git a/whoogle/Dockerfile b/whoogle/Dockerfile index 43f92af24..f33d363eb 100644 --- a/whoogle/Dockerfile +++ b/whoogle/Dockerfile @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/xteve/Dockerfile b/xteve/Dockerfile index aad7a235e..feca2cf95 100644 --- a/xteve/Dockerfile +++ b/xteve/Dockerfile @@ -44,12 +44,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES="" diff --git a/zoneminder/Dockerfile b/zoneminder/Dockerfile index 2d2a880b8..42ff77e2d 100644 --- a/zoneminder/Dockerfile +++ b/zoneminder/Dockerfile @@ -49,12 +49,8 @@ COPY rootfs/ / ARG MODULES="00-banner.sh 01-custom_script.sh" # Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \ - && if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \ - && apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \ - && mkdir -p /etc/cont-init.d \ - && for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \ - && chmod -R 755 /etc/cont-init.d +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_modules.sh" "/ha_modules.sh" +RUN /ha_modules.sh "$MODULES" && rm /ha_modules.sh # Manual apps ENV PACKAGES=""