diff --git a/.templates/00-aaa_dockerfile_backup.sh b/.templates/00-aaa_dockerfile_backup.sh index 8c98c3943..50e5282ae 100755 --- a/.templates/00-aaa_dockerfile_backup.sh +++ b/.templates/00-aaa_dockerfile_backup.sh @@ -27,10 +27,10 @@ if [ -e "/ENVFILE" ]; then 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 && - curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh && - chmod 777 /automatic_packages.sh && - eval /./automatic_packages.sh "${PACKAGES:-}" && - rm /automatic_packages.sh + curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automatic_packages.sh" --output /ha_automatic_packages.sh && + chmod 777 /ha_automatic_packages.sh && + eval /./ha_automatic_packages.sh "${PACKAGES:-}" && + rm /ha_automatic_packages.sh fi if [ -e "/MODULESFILE" ] && [ ! -f /ha_entrypoint.sh ]; then diff --git a/.templates/ha_autoapps.sh b/.templates/ha_autoapps.sh index 73d6e803c..ab42ae59e 100755 --- a/.templates/ha_autoapps.sh +++ b/.templates/ha_autoapps.sh @@ -19,9 +19,9 @@ if ! command -v curl >/dev/null 2>/dev/null; then fi # Call apps installer script if needed -curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh -chmod 777 /automatic_packages.sh -eval /./automatic_packages.sh "${PACKAGES:-}" +curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automatic_packages.sh" --output /ha_automatic_packages.sh +chmod 777 /ha_automatic_packages.sh +eval /./ha_automatic_packages.sh "${PACKAGES:-}" # Clean -rm /automatic_packages.sh +rm /ha_automatic_packages.sh diff --git a/.templates/automatic_packages.sh b/.templates/ha_automatic_packages.sh old mode 100755 new mode 100644 similarity index 100% rename from .templates/automatic_packages.sh rename to .templates/ha_automatic_packages.sh diff --git a/.templates/ha_entrypoint_modif.sh b/.templates/ha_entrypoint_modif.sh new file mode 100644 index 000000000..8c5b73259 --- /dev/null +++ b/.templates/ha_entrypoint_modif.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +########################################## +# Global modifications before entrypoint # +########################################## + +# Corrects permissions for s6 v3 +################################ + +if [ -d /etc/cont-init.d ]; then + chmod -R 755 /etc/cont-init.d +fi + +if [ -d /etc/services.d ]; then + chmod -R 755 /etc/services.d +fi + +# Correct shebang in entrypoint +############################### + +# Make s6 contenv if needed +mkdir -p /run/s6/container_environment + +# Check if shebang exists +for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do + if [ -f "${shebang%% *}" ]; then + break + fi +done + +# Define shebang +sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh diff --git a/addons_updater/Dockerfile b/addons_updater/Dockerfile index daa086a71..889a2a509 100644 --- a/addons_updater/Dockerfile +++ b/addons_updater/Dockerfile @@ -59,13 +59,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # Entrypoint logic diff --git a/arpspoof/Dockerfile b/arpspoof/Dockerfile index 9abd824c3..7091e69f8 100644 --- a/arpspoof/Dockerfile +++ b/arpspoof/Dockerfile @@ -28,7 +28,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -59,13 +58,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/autobrr/Dockerfile b/autobrr/Dockerfile index da1aaf5d3..4cbab02f6 100644 --- a/autobrr/Dockerfile +++ b/autobrr/Dockerfile @@ -66,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh #WORKDIR / ENTRYPOINT [ "/usr/bin/env" ] diff --git a/baikal/Dockerfile b/baikal/Dockerfile index 30a7521c2..66fc52d38 100644 --- a/baikal/Dockerfile +++ b/baikal/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh WORKDIR "/data" diff --git a/bazarr/Dockerfile b/bazarr/Dockerfile index 462991557..00f287cc4 100644 --- a/bazarr/Dockerfile +++ b/bazarr/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/binance-trading-bot/Dockerfile b/binance-trading-bot/Dockerfile index f5da576d0..fa42eccd1 100644 --- a/binance-trading-bot/Dockerfile +++ b/binance-trading-bot/Dockerfile @@ -28,7 +28,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -79,13 +78,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh VOLUME [ "/data" ] WORKDIR / diff --git a/bitwarden/Dockerfile b/bitwarden/Dockerfile index f3c91b9fe..6ff428a06 100644 --- a/bitwarden/Dockerfile +++ b/bitwarden/Dockerfile @@ -35,7 +35,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -69,15 +68,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh - -RUN chmod 777 /etc/services.d/*/* +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/booksonic_air/Dockerfile b/booksonic_air/Dockerfile index 0c962b29a..c7fa81433 100644 --- a/booksonic_air/Dockerfile +++ b/booksonic_air/Dockerfile @@ -69,13 +69,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/browserless_chrome/Dockerfile b/browserless_chrome/Dockerfile index 9cb1e1496..12bd15445 100644 --- a/browserless_chrome/Dockerfile +++ b/browserless_chrome/Dockerfile @@ -60,13 +60,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh RUN sed -i "2a /./ha_entrypoint.sh" start.sh diff --git a/calibre/Dockerfile b/calibre/Dockerfile index fd2246717..caaf1b500 100644 --- a/calibre/Dockerfile +++ b/calibre/Dockerfile @@ -72,13 +72,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/calibre_web/Dockerfile b/calibre_web/Dockerfile index b8957a5aa..1ab7a8256 100644 --- a/calibre_web/Dockerfile +++ b/calibre_web/Dockerfile @@ -78,13 +78,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/changedetection/Dockerfile b/changedetection/Dockerfile new file mode 100644 index 000000000..c944ddf8c --- /dev/null +++ b/changedetection/Dockerfile @@ -0,0 +1,124 @@ +#============================# +# ALEXBELGIUM'S DOCKERFILE # +#============================# +# _.------. +# _.-` ('>.-`"""-. +# '.--'` _'` _ .--.) +# -' '-.-';` ` +# ' - _.' ``'--. +# '---` .-'""` +# /` +#=== Home Assistant Addon ===# + +################# +# 1 Build Image # +################# + +ARG BUILD_FROM +ARG BUILD_VERSION +FROM ${BUILD_FROM} + +################## +# 2 Modify Image # +################## + +# Set S6 wait time +ENV S6_CMD_WAIT_FOR_SERVICES=1 \ + S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ + S6_SERVICES_GRACETIME=0 + +# Image specific modifications + +# 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 && rm /ha_lsio.sh + +################## +# 3 Install apps # +################## + +# Add rootfs +COPY rootfs/ / + +# Modules +ARG MODULES="00-banner.sh 01-custom_script.sh" + +# Automatic modules download +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh" +RUN /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh + +# Manual apps +ENV PACKAGES="" + +# Automatic apps & bashio +ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh" +RUN /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh + +################ +# 4 Entrypoint # +################ + +# Add entrypoint +ENV S6_STAGE2_HOOK=/ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" + +# Entrypoint modifications +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" + +RUN \ + # Corrects permissions for s6 v3 + if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ + if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ + #Correct shebang in entrypoint + mkdir -p /run/s6/container_environment && \ + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh + +# +#WORKDIR / +#ENTRYPOINT [ "/usr/bin/env" ] +#CMD [ "/ha_entrypoint.sh" ] +#SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +############ +# 5 Labels # +############ + +ARG BUILD_ARCH +ARG BUILD_DATE +ARG BUILD_DESCRIPTION +ARG BUILD_NAME +ARG BUILD_REF +ARG BUILD_REPOSITORY +ARG BUILD_VERSION +LABEL \ + io.hass.name="${BUILD_NAME}" \ + io.hass.description="${BUILD_DESCRIPTION}" \ + io.hass.arch="${BUILD_ARCH}" \ + io.hass.type="addon" \ + io.hass.version=${BUILD_VERSION} \ + maintainer="alexbelgium (https://github.com/alexbelgium)" \ + org.opencontainers.image.title="${BUILD_NAME}" \ + org.opencontainers.image.description="${BUILD_DESCRIPTION}" \ + org.opencontainers.image.vendor="Home Assistant Add-ons" \ + org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.url="https://github.com/alexbelgium" \ + org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \ + org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \ + org.opencontainers.image.created=${BUILD_DATE} \ + org.opencontainers.image.revision=${BUILD_REF} \ + org.opencontainers.image.version=${BUILD_VERSION} + +################# +# 6 Healthcheck # +################# + +ENV HEALTH_PORT="32400" \ + HEALTH_URL="/identity" +HEALTHCHECK \ + --interval=5s \ + --retries=5 \ + --start-period=30s \ + --timeout=25s \ + CMD curl --fail "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || curl --fail http://127.0.0.1:443 || exit 1 diff --git a/changedetection/README.md b/changedetection/README.md new file mode 100644 index 000000000..b629f8b81 --- /dev/null +++ b/changedetection/README.md @@ -0,0 +1,71 @@ +# Home assistant add-on: changedetection.io + +[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium) + +![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fchangedetection.io%2Fconfig.json) +![Ingress](https://img.shields.io/badge/dynamic/json?label=Ingress&query=%24.ingress&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fchangedetection.io%2Fconfig.json) +![Arch](https://img.shields.io/badge/dynamic/json?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fchangedetection.io%2Fconfig.json) + +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9c6cf10bdbba45ecb202d7f579b5be0e)](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade) +[![GitHub Super-Linter](https://github.com/alexbelgium/hassio-addons/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) +[![Builder](https://github.com/alexbelgium/hassio-addons/workflows/Builder/badge.svg)](https://github.com/alexbelgium/hassio-addons/actions/workflows/builder.yaml) + +[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white + +_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_ + +[![Stargazers repo roster for @alexbelgium/hassio-addons](https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.github/stars2.svg)](https://github.com/alexbelgium/hassio-addons/stargazers) + +![downloads evolution](https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/changedetection.io/stats.png) + +## About + +[Changedetection.io](https://github.com/dgtlmoon/changedetection.io) provides free, open-source web page monitoring, notification and change detection. + +This addon is based on the [docker image](https://github.com/linuxserver/docker-changedetection.io) from linuxserver.io. + + + + + + + + + + + + + + + + + +## Configuration + +Webui can be found at `:8096`. + +```yaml +PGID: user +GPID: user +TZ: timezone +claim: claim code for changedetection.io server # see https://github.com/linuxserver/docker-changedetection.io +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. ex. sda1, sdb1, MYNAS... +networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas +cifsusername: "username" # optional, smb username, same for all smb shares +cifspassword: "password" # optional, smb password +cifsdomain: "domain" # optional, allow setting the domain for the smb share +``` + +## Installation + +The installation of this add-on is pretty straightforward and not different in +comparison to installing any other Hass.io add-on. + +1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance. +1. Install this add-on. +1. Click the `Save` button to store your configuration. +1. Start the add-on. +1. Check the logs of the add-on to see if everything went well. +1. Carefully configure the add-on to your preferences, see the official documentation for for that. + +[repository]: https://github.com/alexbelgium/hassio-addons diff --git a/cloudcommander/Dockerfile b/cloudcommander/Dockerfile index 45ccad4e6..9aeac4733 100644 --- a/cloudcommander/Dockerfile +++ b/cloudcommander/Dockerfile @@ -60,13 +60,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/ha_entrypoint.sh" ] diff --git a/code-server/Dockerfile b/code-server/Dockerfile index 4c35439da..cfee8ae3c 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile index 17b059077..2942f83b2 100644 --- a/elasticsearch/Dockerfile +++ b/elasticsearch/Dockerfile @@ -71,13 +71,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/emby/Dockerfile b/emby/Dockerfile index 5a1821a10..8a9cc79b5 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/enedisgateway2mqtt/Dockerfile b/enedisgateway2mqtt/Dockerfile index 5618a0568..404b0a530 100644 --- a/enedisgateway2mqtt/Dockerfile +++ b/enedisgateway2mqtt/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -58,13 +57,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/enedisgateway2mqtt_dev/Dockerfile b/enedisgateway2mqtt_dev/Dockerfile index cb68310e5..bc33b7dfb 100644 --- a/enedisgateway2mqtt_dev/Dockerfile +++ b/enedisgateway2mqtt_dev/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -58,13 +57,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/epicgamesfree/Dockerfile b/epicgamesfree/Dockerfile index 402073470..82bb1fb59 100644 --- a/epicgamesfree/Dockerfile +++ b/epicgamesfree/Dockerfile @@ -60,13 +60,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/filebrowser/Dockerfile b/filebrowser/Dockerfile index b4f5e97d5..a270c1c03 100644 --- a/filebrowser/Dockerfile +++ b/filebrowser/Dockerfile @@ -28,7 +28,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -60,13 +59,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh VOLUME [ "/data" ] WORKDIR / diff --git a/fireflyiii/Dockerfile b/fireflyiii/Dockerfile index deafc7312..86d32c70a 100644 --- a/fireflyiii/Dockerfile +++ b/fireflyiii/Dockerfile @@ -69,13 +69,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/fireflyiii_data_importer/Dockerfile b/fireflyiii_data_importer/Dockerfile index e86f1fe85..59330a47e 100644 --- a/fireflyiii_data_importer/Dockerfile +++ b/fireflyiii_data_importer/Dockerfile @@ -65,13 +65,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/fireflyiii_fints_importer/Dockerfile b/fireflyiii_fints_importer/Dockerfile index 65730e808..7da552809 100644 --- a/fireflyiii_fints_importer/Dockerfile +++ b/fireflyiii_fints_importer/Dockerfile @@ -28,7 +28,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -59,13 +58,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/flaresolverr/Dockerfile b/flaresolverr/Dockerfile index 7852ae13c..bf546e7ec 100644 --- a/flaresolverr/Dockerfile +++ b/flaresolverr/Dockerfile @@ -59,13 +59,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/flexget/Dockerfile b/flexget/Dockerfile index 354fdce08..bdd70039f 100644 --- a/flexget/Dockerfile +++ b/flexget/Dockerfile @@ -75,13 +75,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/free_games_claimer/Dockerfile b/free_games_claimer/Dockerfile index 05e44a2d4..08a197d72 100644 --- a/free_games_claimer/Dockerfile +++ b/free_games_claimer/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -58,13 +57,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh RUN \ # Change data folder diff --git a/gazpar2mqtt/Dockerfile b/gazpar2mqtt/Dockerfile index ae729817d..47ccc4e2c 100644 --- a/gazpar2mqtt/Dockerfile +++ b/gazpar2mqtt/Dockerfile @@ -60,13 +60,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/gitea/Dockerfile b/gitea/Dockerfile index d1ea693b2..123dffd90 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/ha_entrypoint.sh" ] diff --git a/grav/Dockerfile b/grav/Dockerfile index efd12db82..ada4b639b 100644 --- a/grav/Dockerfile +++ b/grav/Dockerfile @@ -66,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/guacamole/Dockerfile b/guacamole/Dockerfile index 55eb14054..8e6836495 100644 --- a/guacamole/Dockerfile +++ b/guacamole/Dockerfile @@ -90,13 +90,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR /data diff --git a/immich/Dockerfile b/immich/Dockerfile index fdbdd34b0..801049891 100644 --- a/immich/Dockerfile +++ b/immich/Dockerfile @@ -81,13 +81,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/inadyn/Dockerfile b/inadyn/Dockerfile index 07e58510b..eaf4017f0 100644 --- a/inadyn/Dockerfile +++ b/inadyn/Dockerfile @@ -83,13 +83,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh WORKDIR / diff --git a/jackett/Dockerfile b/jackett/Dockerfile index 267f03ae2..83fb081a8 100644 --- a/jackett/Dockerfile +++ b/jackett/Dockerfile @@ -65,13 +65,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile index dae73de83..7f00e4357 100644 --- a/jellyfin/Dockerfile +++ b/jellyfin/Dockerfile @@ -71,13 +71,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/jellyseerr/Dockerfile b/jellyseerr/Dockerfile index 94d032fe6..ef9cfbf69 100644 --- a/jellyseerr/Dockerfile +++ b/jellyseerr/Dockerfile @@ -69,13 +69,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/joal/Dockerfile b/joal/Dockerfile index d356076de..ed023a87d 100644 --- a/joal/Dockerfile +++ b/joal/Dockerfile @@ -71,13 +71,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/joplin/Dockerfile b/joplin/Dockerfile index 72aef2825..272dbcb49 100644 --- a/joplin/Dockerfile +++ b/joplin/Dockerfile @@ -65,13 +65,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/lidarr/Dockerfile b/lidarr/Dockerfile index 17ecc86f1..abab56887 100644 --- a/lidarr/Dockerfile +++ b/lidarr/Dockerfile @@ -65,13 +65,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/mealie/Dockerfile b/mealie/Dockerfile index 1d2d74012..fd5392a08 100644 --- a/mealie/Dockerfile +++ b/mealie/Dockerfile @@ -66,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh RUN \ # Add custom instructions to run.sh on armv7 diff --git a/mylar3/Dockerfile b/mylar3/Dockerfile index b90b50df6..6ef5724ec 100644 --- a/mylar3/Dockerfile +++ b/mylar3/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 78d3ba3c2..580672b0a 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -88,13 +88,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # Correct modifications ARG CONFIGLOCATION="/www/nextcloud/config" diff --git a/nzbget/Dockerfile b/nzbget/Dockerfile index 9206372f7..05ad8f8c0 100644 --- a/nzbget/Dockerfile +++ b/nzbget/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/omada/Dockerfile b/omada/Dockerfile index 71145ad8e..9d4fac6c6 100644 --- a/omada/Dockerfile +++ b/omada/Dockerfile @@ -66,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/omada_v3/Dockerfile b/omada_v3/Dockerfile index e7fb6a255..940beb99d 100644 --- a/omada_v3/Dockerfile +++ b/omada_v3/Dockerfile @@ -67,13 +67,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/ombi/Dockerfile b/ombi/Dockerfile index 4d7aaa49b..a24f78c83 100644 --- a/ombi/Dockerfile +++ b/ombi/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/organizr/Dockerfile b/organizr/Dockerfile index ddedb3994..0c0602584 100644 --- a/organizr/Dockerfile +++ b/organizr/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/overseerr/Dockerfile b/overseerr/Dockerfile index dccd6f740..500c5fdff 100644 --- a/overseerr/Dockerfile +++ b/overseerr/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/paperless_ngx/Dockerfile b/paperless_ngx/Dockerfile index acf527791..27cecec5c 100644 --- a/paperless_ngx/Dockerfile +++ b/paperless_ngx/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh #WORKDIR / diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 24718b7fb..76be0b5f9 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -73,13 +73,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/photoprism/Dockerfile b/photoprism/Dockerfile index 3be6adefa..f9ea149b9 100644 --- a/photoprism/Dockerfile +++ b/photoprism/Dockerfile @@ -70,13 +70,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/piwigo/Dockerfile b/piwigo/Dockerfile index 14fec4031..a1a4122cc 100644 --- a/piwigo/Dockerfile +++ b/piwigo/Dockerfile @@ -64,13 +64,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # hadolint ignore=SC2013 RUN \ diff --git a/plex/Dockerfile b/plex/Dockerfile index deee2de2e..56acbfbdd 100644 --- a/plex/Dockerfile +++ b/plex/Dockerfile @@ -75,13 +75,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/plex_meta_manager/Dockerfile b/plex_meta_manager/Dockerfile index f6f7d33dc..d0dc60ea9 100644 --- a/plex_meta_manager/Dockerfile +++ b/plex_meta_manager/Dockerfile @@ -71,13 +71,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/portainer/Dockerfile b/portainer/Dockerfile index ad6bef238..15607d005 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -81,13 +81,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh RUN chmod 777 /etc/services.d/*/* # diff --git a/portainer_agent/Dockerfile b/portainer_agent/Dockerfile index 34f50c99c..665975387 100644 --- a/portainer_agent/Dockerfile +++ b/portainer_agent/Dockerfile @@ -36,7 +36,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -67,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh RUN chmod a+x /usr/sbin/healthcheck && \ chmod a+x /usr/sbin/wait-for-signal diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 4f0798279..06f37e64c 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh WORKDIR /data ENTRYPOINT [ "/usr/bin/env" ] diff --git a/prowlarr/Dockerfile b/prowlarr/Dockerfile index 23f04b19c..a34af4f85 100644 --- a/prowlarr/Dockerfile +++ b/prowlarr/Dockerfile @@ -65,13 +65,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index 57857e834..f3cead6a2 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -101,13 +101,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/radarr/Dockerfile b/radarr/Dockerfile index 18fba03cc..c178d3f6a 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -66,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/readarr/Dockerfile b/readarr/Dockerfile index 00d5352f5..f3db33152 100644 --- a/readarr/Dockerfile +++ b/readarr/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/requestrr/Dockerfile b/requestrr/Dockerfile index d1ef9378b..c04dc3575 100644 --- a/requestrr/Dockerfile +++ b/requestrr/Dockerfile @@ -65,13 +65,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/resiliosync/Dockerfile b/resiliosync/Dockerfile index 7c5d9fe3e..0d048c286 100644 --- a/resiliosync/Dockerfile +++ b/resiliosync/Dockerfile @@ -86,13 +86,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/sabnzbd/Dockerfile b/sabnzbd/Dockerfile index 229b8669c..dfe466c99 100644 --- a/sabnzbd/Dockerfile +++ b/sabnzbd/Dockerfile @@ -62,13 +62,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/scrutiny/Dockerfile b/scrutiny/Dockerfile index a4f002bdd..edf9169ec 100644 --- a/scrutiny/Dockerfile +++ b/scrutiny/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -61,13 +60,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh diff --git a/scrutiny_fa/Dockerfile b/scrutiny_fa/Dockerfile index a4f002bdd..edf9169ec 100644 --- a/scrutiny_fa/Dockerfile +++ b/scrutiny_fa/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -61,13 +60,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh diff --git a/seafile/Dockerfile b/seafile/Dockerfile index e8e499867..bd9161b34 100644 --- a/seafile/Dockerfile +++ b/seafile/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index d1bffca3a..839c920a9 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -66,13 +66,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/sponsorblockcast/Dockerfile b/sponsorblockcast/Dockerfile index 5defe76cd..6ecc3ebf7 100644 --- a/sponsorblockcast/Dockerfile +++ b/sponsorblockcast/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -60,13 +59,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # Entrypoint logic diff --git a/spotweb/Dockerfile b/spotweb/Dockerfile index 67348c911..c983cc4de 100644 --- a/spotweb/Dockerfile +++ b/spotweb/Dockerfile @@ -116,13 +116,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/tandoor_recipes/Dockerfile b/tandoor_recipes/Dockerfile index 7c22bfee9..2c4dfdc73 100644 --- a/tandoor_recipes/Dockerfile +++ b/tandoor_recipes/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -58,13 +57,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh #WORKDIR /data/recipes diff --git a/tdarr/Dockerfile b/tdarr/Dockerfile index 8b461272b..7b906a7c9 100644 --- a/tdarr/Dockerfile +++ b/tdarr/Dockerfile @@ -27,7 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 - ################## # 3 Install apps # ################## @@ -58,13 +57,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/teamspeak/Dockerfile b/teamspeak/Dockerfile index d447bd181..c38d7d3e5 100644 --- a/teamspeak/Dockerfile +++ b/teamspeak/Dockerfile @@ -64,13 +64,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/transmission/Dockerfile b/transmission/Dockerfile index e8ba8a631..4f286c91c 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -73,13 +73,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/transmission_openvpn/Dockerfile b/transmission_openvpn/Dockerfile index 06b9e6862..4eaa4afcd 100644 --- a/transmission_openvpn/Dockerfile +++ b/transmission_openvpn/Dockerfile @@ -68,13 +68,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh CMD [ "/ha_entrypoint.sh" ] diff --git a/ubooquity/Dockerfile b/ubooquity/Dockerfile index a60472d3f..e5196f266 100644 --- a/ubooquity/Dockerfile +++ b/ubooquity/Dockerfile @@ -76,13 +76,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/unpackerr/Dockerfile b/unpackerr/Dockerfile index d3d486c80..18f9d3106 100644 --- a/unpackerr/Dockerfile +++ b/unpackerr/Dockerfile @@ -61,13 +61,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ############ # 5 Labels # diff --git a/webtop_kde/Dockerfile b/webtop_kde/Dockerfile index 7ecba435f..5bca7e1fa 100644 --- a/webtop_kde/Dockerfile +++ b/webtop_kde/Dockerfile @@ -72,13 +72,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index 040f1c526..a53af7086 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -71,13 +71,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/wger/Dockerfile b/wger/Dockerfile index ed02d2a67..87cbfff93 100644 --- a/wger/Dockerfile +++ b/wger/Dockerfile @@ -69,13 +69,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh USER wger diff --git a/whoogle/Dockerfile b/whoogle/Dockerfile index e37653c46..bc346ddde 100644 --- a/whoogle/Dockerfile +++ b/whoogle/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/xteve/Dockerfile b/xteve/Dockerfile index 12e6fb6e9..782f2a492 100644 --- a/xteve/Dockerfile +++ b/xteve/Dockerfile @@ -63,13 +63,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh # #WORKDIR / diff --git a/zoneminder/Dockerfile b/zoneminder/Dockerfile index d07cdf4fc..1a340f372 100644 --- a/zoneminder/Dockerfile +++ b/zoneminder/Dockerfile @@ -68,13 +68,8 @@ ENV S6_STAGE2_HOOK=/ha_entrypoint.sh ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" # Entrypoint modifications -RUN \ - # Corrects permissions for s6 v3 - if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ - #Correct shebang in entrypoint - mkdir -p /run/s6/container_environment && \ - for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do if [ -f "${shebang%% *}" ]; then break; fi; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh +ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint_modif.sh" +RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ]