mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-03 04:28:45 +02:00
Update Dockerfile
This commit is contained in:
@@ -162,31 +162,42 @@ exit 0
|
|||||||
EOF
|
EOF
|
||||||
RUN chmod +x /usr/local/bin/ente-web-prepare
|
RUN chmod +x /usr/local/bin/ente-web-prepare
|
||||||
|
|
||||||
#####################################################
|
##################
|
||||||
# 7 Optional modules (same pattern as your add‑ons) #
|
# 3 Install apps #
|
||||||
#####################################################
|
##################
|
||||||
ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh"
|
# 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"
|
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
|
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
|
||||||
|
|
||||||
# Optional extra packages via your helper
|
# Manual apps
|
||||||
ENV PACKAGES="sudo jq yamllint"
|
ENV PACKAGES="nginx"
|
||||||
|
|
||||||
|
# Automatic apps & bashio
|
||||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
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
|
RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
|
||||||
|
|
||||||
################
|
################
|
||||||
# 8 Entrypoint #
|
# 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
|
|
||||||
|
|
||||||
############################
|
# Add entrypoint
|
||||||
# 9 Copy add‑on rootfs tree #
|
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
|
||||||
############################
|
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
|
||||||
COPY rootfs/ /
|
|
||||||
|
# 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" ]
|
ENTRYPOINT [ "/usr/bin/env" ]
|
||||||
CMD [ "/ha_entrypoint.sh" ]
|
CMD [ "/ha_entrypoint.sh" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user