From c97e1007e167128ee6622266495b8b02ef2be220 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 9 Sep 2023 09:20:16 +0200 Subject: [PATCH] Entrypoint modification --- addons_updater/Dockerfile | 10 +++++++--- arpspoof/Dockerfile | 10 +++++++--- autobrr/Dockerfile | 10 +++++++--- baikal/Dockerfile | 10 +++++++--- bazarr/Dockerfile | 10 +++++++--- binance-trading-bot/Dockerfile | 10 +++++++--- bitwarden/Dockerfile | 10 +++++++--- booksonic_air/Dockerfile | 10 +++++++--- browserless_chrome/Dockerfile | 10 +++++++--- calibre/Dockerfile | 11 +++++++---- calibre_web/Dockerfile | 10 +++++++--- cloudcommander/Dockerfile | 10 +++++++--- code-server/Dockerfile | 10 +++++++--- elasticsearch/Dockerfile | 10 +++++++--- emby/Dockerfile | 10 +++++++--- enedisgateway2mqtt/Dockerfile | 10 +++++++--- enedisgateway2mqtt_dev/Dockerfile | 10 +++++++--- epicgamesfree/Dockerfile | 10 +++++++--- filebrowser/Dockerfile | 10 +++++++--- fireflyiii/Dockerfile | 10 +++++++--- fireflyiii_data_importer/Dockerfile | 10 +++++++--- fireflyiii_fints_importer/Dockerfile | 10 +++++++--- flaresolverr/Dockerfile | 10 +++++++--- flexget/Dockerfile | 10 +++++++--- free_games_claimer/Dockerfile | 10 +++++++--- gazpar2mqtt/Dockerfile | 10 +++++++--- gitea/Dockerfile | 10 +++++++--- grav/Dockerfile | 10 +++++++--- guacamole/Dockerfile | 10 +++++++--- immich/Dockerfile | 10 +++++++--- inadyn/Dockerfile | 10 +++++++--- jackett/Dockerfile | 10 +++++++--- jellyfin/Dockerfile | 10 +++++++--- jellyseerr/Dockerfile | 10 +++++++--- joal/Dockerfile | 10 +++++++--- joplin/Dockerfile | 10 +++++++--- lidarr/Dockerfile | 10 +++++++--- mealie/Dockerfile | 10 +++++++--- mylar3/Dockerfile | 10 +++++++--- nextcloud/Dockerfile | 10 +++++++--- nzbget/Dockerfile | 10 +++++++--- omada/Dockerfile | 10 +++++++--- omada_v3/Dockerfile | 10 +++++++--- ombi/Dockerfile | 10 +++++++--- organizr/Dockerfile | 10 +++++++--- overseerr/Dockerfile | 10 +++++++--- paperless_ngx/Dockerfile | 10 +++++++--- papermerge/Dockerfile | 10 +++++++--- photoprism/Dockerfile | 10 +++++++--- piwigo/Dockerfile | 10 +++++++--- plex/Dockerfile | 10 +++++++--- plex_meta_manager/Dockerfile | 10 +++++++--- portainer/Dockerfile | 10 +++++++--- portainer_agent/Dockerfile | 10 +++++++--- postgres/Dockerfile | 10 +++++++--- prowlarr/Dockerfile | 10 +++++++--- qbittorrent/Dockerfile | 10 +++++++--- radarr/Dockerfile | 10 +++++++--- readarr/Dockerfile | 10 +++++++--- requestrr/Dockerfile | 10 +++++++--- resiliosync/Dockerfile | 10 +++++++--- sabnzbd/Dockerfile | 10 +++++++--- scrutiny/Dockerfile | 10 +++++++--- scrutiny_fa/Dockerfile | 10 +++++++--- seafile/Dockerfile | 10 +++++++--- sonarr/Dockerfile | 10 +++++++--- sponsorblockcast/Dockerfile | 10 +++++++--- spotweb/Dockerfile | 10 +++++++--- tandoor_recipes/Dockerfile | 10 +++++++--- tdarr/Dockerfile | 10 +++++++--- teamspeak/Dockerfile | 10 +++++++--- transmission/Dockerfile | 10 +++++++--- transmission_openvpn/Dockerfile | 10 +++++++--- ubooquity/Dockerfile | 10 +++++++--- unpackerr/Dockerfile | 10 +++++++--- webtop_kde/Dockerfile | 10 +++++++--- webtrees/Dockerfile | 10 +++++++--- wger/Dockerfile | 10 +++++++--- whoogle/Dockerfile | 10 +++++++--- xteve/Dockerfile | 10 +++++++--- zoneminder/Dockerfile | 10 +++++++--- 81 files changed, 567 insertions(+), 244 deletions(-) diff --git a/addons_updater/Dockerfile b/addons_updater/Dockerfile index d60b418b1..d9216b6ab 100644 --- a/addons_updater/Dockerfile +++ b/addons_updater/Dockerfile @@ -66,9 +66,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # Entrypoint logic diff --git a/arpspoof/Dockerfile b/arpspoof/Dockerfile index bbc52c809..c8ca58b5f 100644 --- a/arpspoof/Dockerfile +++ b/arpspoof/Dockerfile @@ -66,9 +66,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/autobrr/Dockerfile b/autobrr/Dockerfile index 01bea8508..0dae361f3 100644 --- a/autobrr/Dockerfile +++ b/autobrr/Dockerfile @@ -92,9 +92,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh #WORKDIR / ENTRYPOINT [ "/usr/bin/env" ] diff --git a/baikal/Dockerfile b/baikal/Dockerfile index 6fe220a79..6686d4ed7 100644 --- a/baikal/Dockerfile +++ b/baikal/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh WORKDIR "/data" diff --git a/bazarr/Dockerfile b/bazarr/Dockerfile index dbb095d12..a9530cea9 100644 --- a/bazarr/Dockerfile +++ b/bazarr/Dockerfile @@ -89,9 +89,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/binance-trading-bot/Dockerfile b/binance-trading-bot/Dockerfile index 57735f187..5df8b34a2 100644 --- a/binance-trading-bot/Dockerfile +++ b/binance-trading-bot/Dockerfile @@ -86,9 +86,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh VOLUME [ "/data" ] WORKDIR / diff --git a/bitwarden/Dockerfile b/bitwarden/Dockerfile index 1378c72b2..23f8b9a28 100644 --- a/bitwarden/Dockerfile +++ b/bitwarden/Dockerfile @@ -76,9 +76,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh RUN chmod 777 /etc/services.d/*/* diff --git a/booksonic_air/Dockerfile b/booksonic_air/Dockerfile index f856df7d5..3f0b64da6 100644 --- a/booksonic_air/Dockerfile +++ b/booksonic_air/Dockerfile @@ -94,9 +94,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/browserless_chrome/Dockerfile b/browserless_chrome/Dockerfile index ba490e510..a903aa49f 100644 --- a/browserless_chrome/Dockerfile +++ b/browserless_chrome/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/calibre/Dockerfile b/calibre/Dockerfile index 5d24f228d..1f15c3ab5 100644 --- a/calibre/Dockerfile +++ b/calibre/Dockerfile @@ -95,11 +95,14 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh -# #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] #CMD [ "/ha_entrypoint.sh" ] diff --git a/calibre_web/Dockerfile b/calibre_web/Dockerfile index af09fe1a1..f3e1b520e 100644 --- a/calibre_web/Dockerfile +++ b/calibre_web/Dockerfile @@ -103,9 +103,13 @@ RUN if ! command -v sqlite3 >/dev/null 2>/dev/null; then (apt-get update && apt- # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/cloudcommander/Dockerfile b/cloudcommander/Dockerfile index 23857714a..d40b44dfa 100644 --- a/cloudcommander/Dockerfile +++ b/cloudcommander/Dockerfile @@ -68,9 +68,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/ha_entrypoint.sh" ] diff --git a/code-server/Dockerfile b/code-server/Dockerfile index f8b8382e3..0d0b4a103 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -89,9 +89,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile index 1ae22d071..26cd93d08 100644 --- a/elasticsearch/Dockerfile +++ b/elasticsearch/Dockerfile @@ -78,9 +78,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/emby/Dockerfile b/emby/Dockerfile index 7b4e68cd1..a6e47184f 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/enedisgateway2mqtt/Dockerfile b/enedisgateway2mqtt/Dockerfile index 94543faca..719acbb2e 100644 --- a/enedisgateway2mqtt/Dockerfile +++ b/enedisgateway2mqtt/Dockerfile @@ -65,9 +65,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/enedisgateway2mqtt_dev/Dockerfile b/enedisgateway2mqtt_dev/Dockerfile index fa4f07613..4836f4333 100644 --- a/enedisgateway2mqtt_dev/Dockerfile +++ b/enedisgateway2mqtt_dev/Dockerfile @@ -65,9 +65,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/epicgamesfree/Dockerfile b/epicgamesfree/Dockerfile index f61efea16..53ca3d4db 100644 --- a/epicgamesfree/Dockerfile +++ b/epicgamesfree/Dockerfile @@ -67,9 +67,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/filebrowser/Dockerfile b/filebrowser/Dockerfile index 22c82e294..d860aa750 100644 --- a/filebrowser/Dockerfile +++ b/filebrowser/Dockerfile @@ -67,9 +67,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh VOLUME [ "/data" ] WORKDIR / diff --git a/fireflyiii/Dockerfile b/fireflyiii/Dockerfile index 065da8681..23ef96a54 100644 --- a/fireflyiii/Dockerfile +++ b/fireflyiii/Dockerfile @@ -76,9 +76,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/fireflyiii_data_importer/Dockerfile b/fireflyiii_data_importer/Dockerfile index 90590d340..9e8f75b65 100644 --- a/fireflyiii_data_importer/Dockerfile +++ b/fireflyiii_data_importer/Dockerfile @@ -72,9 +72,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/fireflyiii_fints_importer/Dockerfile b/fireflyiii_fints_importer/Dockerfile index a81cbeebf..c78654e3f 100644 --- a/fireflyiii_fints_importer/Dockerfile +++ b/fireflyiii_fints_importer/Dockerfile @@ -66,9 +66,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/flaresolverr/Dockerfile b/flaresolverr/Dockerfile index 32a68e014..634cfe06c 100644 --- a/flaresolverr/Dockerfile +++ b/flaresolverr/Dockerfile @@ -66,9 +66,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/flexget/Dockerfile b/flexget/Dockerfile index 3d9ff9798..925553679 100644 --- a/flexget/Dockerfile +++ b/flexget/Dockerfile @@ -100,9 +100,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/free_games_claimer/Dockerfile b/free_games_claimer/Dockerfile index 2785f167c..52dde5570 100644 --- a/free_games_claimer/Dockerfile +++ b/free_games_claimer/Dockerfile @@ -65,9 +65,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh RUN \ # Change data folder diff --git a/gazpar2mqtt/Dockerfile b/gazpar2mqtt/Dockerfile index b30a87ddd..06778e350 100644 --- a/gazpar2mqtt/Dockerfile +++ b/gazpar2mqtt/Dockerfile @@ -67,9 +67,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/gitea/Dockerfile b/gitea/Dockerfile index 3a8dd3979..19dbaa47f 100644 --- a/gitea/Dockerfile +++ b/gitea/Dockerfile @@ -69,9 +69,13 @@ EXPOSE 22 3000 # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/ha_entrypoint.sh" ] diff --git a/grav/Dockerfile b/grav/Dockerfile index 4e8cf6c60..90b12a276 100644 --- a/grav/Dockerfile +++ b/grav/Dockerfile @@ -92,9 +92,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/guacamole/Dockerfile b/guacamole/Dockerfile index 3c5ba0acf..20092a2b5 100644 --- a/guacamole/Dockerfile +++ b/guacamole/Dockerfile @@ -97,9 +97,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR /data diff --git a/immich/Dockerfile b/immich/Dockerfile index 5c0d278e9..aa535c75a 100644 --- a/immich/Dockerfile +++ b/immich/Dockerfile @@ -107,9 +107,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/inadyn/Dockerfile b/inadyn/Dockerfile index f8ee0b9d4..83e4df672 100644 --- a/inadyn/Dockerfile +++ b/inadyn/Dockerfile @@ -90,9 +90,13 @@ RUN apk add --no-cache \ # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh WORKDIR / diff --git a/jackett/Dockerfile b/jackett/Dockerfile index ca3873af4..4ced5953f 100644 --- a/jackett/Dockerfile +++ b/jackett/Dockerfile @@ -91,9 +91,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile index 95afd1f81..541f6c043 100644 --- a/jellyfin/Dockerfile +++ b/jellyfin/Dockerfile @@ -96,9 +96,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/jellyseerr/Dockerfile b/jellyseerr/Dockerfile index c4bcd4845..432679bb0 100644 --- a/jellyseerr/Dockerfile +++ b/jellyseerr/Dockerfile @@ -73,9 +73,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/joal/Dockerfile b/joal/Dockerfile index a5fbb5794..a91c96bf3 100644 --- a/joal/Dockerfile +++ b/joal/Dockerfile @@ -78,9 +78,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/joplin/Dockerfile b/joplin/Dockerfile index 55a30feb1..852f76276 100644 --- a/joplin/Dockerfile +++ b/joplin/Dockerfile @@ -72,9 +72,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/lidarr/Dockerfile b/lidarr/Dockerfile index c834e4563..ed4f37758 100644 --- a/lidarr/Dockerfile +++ b/lidarr/Dockerfile @@ -91,9 +91,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/mealie/Dockerfile b/mealie/Dockerfile index 0938ba186..2f9550ddb 100644 --- a/mealie/Dockerfile +++ b/mealie/Dockerfile @@ -73,9 +73,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh RUN \ # Add custom instructions to run.sh on armv7 diff --git a/mylar3/Dockerfile b/mylar3/Dockerfile index 585b2059b..1ba035676 100644 --- a/mylar3/Dockerfile +++ b/mylar3/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 21f04d136..4af61d316 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -124,9 +124,13 @@ VOLUME ["/share", "/ssl", "/data", "/media"] # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # Correct modifications ARG CONFIGLOCATION="/www/nextcloud/config" diff --git a/nzbget/Dockerfile b/nzbget/Dockerfile index 7eb97d4fb..5881ff5e6 100644 --- a/nzbget/Dockerfile +++ b/nzbget/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/omada/Dockerfile b/omada/Dockerfile index 4f15a63b8..3536448dd 100644 --- a/omada/Dockerfile +++ b/omada/Dockerfile @@ -73,9 +73,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/omada_v3/Dockerfile b/omada_v3/Dockerfile index fb39fd357..fc891ae79 100644 --- a/omada_v3/Dockerfile +++ b/omada_v3/Dockerfile @@ -74,9 +74,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #ENTRYPOINT [ "/usr/bin/env" ] diff --git a/ombi/Dockerfile b/ombi/Dockerfile index 94ad18001..ced924030 100644 --- a/ombi/Dockerfile +++ b/ombi/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/organizr/Dockerfile b/organizr/Dockerfile index 5ed8afff0..e658ce234 100644 --- a/organizr/Dockerfile +++ b/organizr/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/overseerr/Dockerfile b/overseerr/Dockerfile index 4ea900ad0..d5cdd8cc1 100644 --- a/overseerr/Dockerfile +++ b/overseerr/Dockerfile @@ -89,9 +89,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/paperless_ngx/Dockerfile b/paperless_ngx/Dockerfile index 93e52452a..2878d1962 100644 --- a/paperless_ngx/Dockerfile +++ b/paperless_ngx/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh #WORKDIR / diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 1cf53592f..daf79dd13 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -98,9 +98,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/photoprism/Dockerfile b/photoprism/Dockerfile index d7b6d2c6a..24f6c4e0b 100644 --- a/photoprism/Dockerfile +++ b/photoprism/Dockerfile @@ -77,9 +77,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/piwigo/Dockerfile b/piwigo/Dockerfile index 99ecdd971..4914d1563 100644 --- a/piwigo/Dockerfile +++ b/piwigo/Dockerfile @@ -90,9 +90,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # hadolint ignore=SC2013 RUN \ diff --git a/plex/Dockerfile b/plex/Dockerfile index 1ddc4b61c..d64bc00c5 100644 --- a/plex/Dockerfile +++ b/plex/Dockerfile @@ -100,9 +100,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/plex_meta_manager/Dockerfile b/plex_meta_manager/Dockerfile index 113695b92..981592295 100644 --- a/plex_meta_manager/Dockerfile +++ b/plex_meta_manager/Dockerfile @@ -96,9 +96,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/portainer/Dockerfile b/portainer/Dockerfile index e80c70be1..aab805ab0 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh RUN chmod 777 /etc/services.d/*/* # diff --git a/portainer_agent/Dockerfile b/portainer_agent/Dockerfile index 494c9adc7..2f9b5ba05 100644 --- a/portainer_agent/Dockerfile +++ b/portainer_agent/Dockerfile @@ -74,9 +74,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.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 33caf2db5..f1bcd487e 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh WORKDIR /data diff --git a/prowlarr/Dockerfile b/prowlarr/Dockerfile index a26234506..c3aae71f5 100644 --- a/prowlarr/Dockerfile +++ b/prowlarr/Dockerfile @@ -91,9 +91,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index b36559da5..636fc7078 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -126,9 +126,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/radarr/Dockerfile b/radarr/Dockerfile index 790d4a364..251a00c8d 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -92,9 +92,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/readarr/Dockerfile b/readarr/Dockerfile index 1d34e02e8..67f5b9668 100644 --- a/readarr/Dockerfile +++ b/readarr/Dockerfile @@ -89,9 +89,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/requestrr/Dockerfile b/requestrr/Dockerfile index 1899dc2c0..8058540a7 100644 --- a/requestrr/Dockerfile +++ b/requestrr/Dockerfile @@ -91,9 +91,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/resiliosync/Dockerfile b/resiliosync/Dockerfile index e0985a30e..496683335 100644 --- a/resiliosync/Dockerfile +++ b/resiliosync/Dockerfile @@ -111,9 +111,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/sabnzbd/Dockerfile b/sabnzbd/Dockerfile index 56402cbdc..b2016bbeb 100644 --- a/sabnzbd/Dockerfile +++ b/sabnzbd/Dockerfile @@ -88,9 +88,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/scrutiny/Dockerfile b/scrutiny/Dockerfile index 627ecd54d..c96b33237 100644 --- a/scrutiny/Dockerfile +++ b/scrutiny/Dockerfile @@ -68,9 +68,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh diff --git a/scrutiny_fa/Dockerfile b/scrutiny_fa/Dockerfile index 627ecd54d..c96b33237 100644 --- a/scrutiny_fa/Dockerfile +++ b/scrutiny_fa/Dockerfile @@ -68,9 +68,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh diff --git a/seafile/Dockerfile b/seafile/Dockerfile index 837f8c357..76ba372ce 100644 --- a/seafile/Dockerfile +++ b/seafile/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index 62e49d2d0..ccf2044f9 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -92,9 +92,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/sponsorblockcast/Dockerfile b/sponsorblockcast/Dockerfile index ee97a1da2..95c04a1fe 100644 --- a/sponsorblockcast/Dockerfile +++ b/sponsorblockcast/Dockerfile @@ -67,9 +67,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # Entrypoint logic diff --git a/spotweb/Dockerfile b/spotweb/Dockerfile index 90ea34126..e39030709 100644 --- a/spotweb/Dockerfile +++ b/spotweb/Dockerfile @@ -123,9 +123,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/tandoor_recipes/Dockerfile b/tandoor_recipes/Dockerfile index 07acea548..603de34bf 100644 --- a/tandoor_recipes/Dockerfile +++ b/tandoor_recipes/Dockerfile @@ -64,9 +64,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh #WORKDIR /data/recipes diff --git a/tdarr/Dockerfile b/tdarr/Dockerfile index 42fd23b73..31183de24 100644 --- a/tdarr/Dockerfile +++ b/tdarr/Dockerfile @@ -65,9 +65,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/teamspeak/Dockerfile b/teamspeak/Dockerfile index 46552804b..bc5c98ea0 100644 --- a/teamspeak/Dockerfile +++ b/teamspeak/Dockerfile @@ -71,9 +71,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/transmission/Dockerfile b/transmission/Dockerfile index d661c46a6..fd9a1175c 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -100,9 +100,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/transmission_openvpn/Dockerfile b/transmission_openvpn/Dockerfile index 31230b59e..8a1f5aa81 100644 --- a/transmission_openvpn/Dockerfile +++ b/transmission_openvpn/Dockerfile @@ -93,9 +93,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh CMD [ "/ha_entrypoint.sh" ] diff --git a/ubooquity/Dockerfile b/ubooquity/Dockerfile index 31f4ce9ad..a5d326915 100644 --- a/ubooquity/Dockerfile +++ b/ubooquity/Dockerfile @@ -101,9 +101,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/unpackerr/Dockerfile b/unpackerr/Dockerfile index 23e5e5a09..f2e96950c 100644 --- a/unpackerr/Dockerfile +++ b/unpackerr/Dockerfile @@ -87,9 +87,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ############ # 5 Labels # diff --git a/webtop_kde/Dockerfile b/webtop_kde/Dockerfile index b4e176865..902ac5b77 100644 --- a/webtop_kde/Dockerfile +++ b/webtop_kde/Dockerfile @@ -98,9 +98,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index 4e36cf215..2fc2ed122 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -78,9 +78,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/wger/Dockerfile b/wger/Dockerfile index e962a10cc..162a9df00 100644 --- a/wger/Dockerfile +++ b/wger/Dockerfile @@ -75,9 +75,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh USER wger diff --git a/whoogle/Dockerfile b/whoogle/Dockerfile index b19a3d466..10dc1f07d 100644 --- a/whoogle/Dockerfile +++ b/whoogle/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] diff --git a/xteve/Dockerfile b/xteve/Dockerfile index 31bd95b05..dd9292901 100644 --- a/xteve/Dockerfile +++ b/xteve/Dockerfile @@ -70,9 +70,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # #WORKDIR / diff --git a/zoneminder/Dockerfile b/zoneminder/Dockerfile index e15e732d3..ec3fd1548 100644 --- a/zoneminder/Dockerfile +++ b/zoneminder/Dockerfile @@ -75,9 +75,13 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get # Add entrypoint ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -# Corrects permissions for s6 v3 -RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ - if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi +# 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 + for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/bin/bash" "/bin/sh"; do [[ -f "${shebang%% *}" ]] && break; done; sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ]