From f9534f3741a219fa89dd9bd697c77106c3fd9349 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 16 Jul 2025 23:12:24 +0200 Subject: [PATCH] Update Dockerfile --- ente/Dockerfile | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/ente/Dockerfile b/ente/Dockerfile index 33c135be1..b218ea67c 100644 --- a/ente/Dockerfile +++ b/ente/Dockerfile @@ -162,31 +162,42 @@ exit 0 EOF RUN chmod +x /usr/local/bin/ente-web-prepare -##################################################### -# 7 Optional modules (same pattern as your add‑ons) # -##################################################### -ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh" +################## +# 3 Install apps # +################## +# Copy local files +COPY rootfs/ / + +# Uses /bin for compatibility purposes +# hadolint ignore=DL4005 +RUN if [ ! -f /bin/sh ] && [ -f /usr/bin/sh ]; then ln -s /usr/bin/sh /bin/sh; fi && \ + if [ ! -f /bin/bash ] && [ -f /usr/bin/bash ]; then ln -s /usr/bin/bash /bin/bash; fi + +# Modules +ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh" + +# Automatic modules download ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh" RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh -# Optional extra packages via your helper -ENV PACKAGES="sudo jq yamllint" +# Manual apps +ENV PACKAGES="nginx" + +# Automatic apps & bashio ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh" RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh ################ # 8 Entrypoint # ################ -ENV S6_STAGE2_HOOK=/ha_entrypoint.sh -ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" -ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh" -RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh \ - && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh -############################ -# 9 Copy add‑on rootfs tree # -############################ -COPY rootfs/ / +# Add entrypoint +ENV S6_STAGE2_HOOK=/ha_entrypoint.sh +ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh" + +# Entrypoint modifications +ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh" +RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/ha_entrypoint.sh" ]