This commit is contained in:
Alexandre
2023-11-21 09:53:56 +01:00
parent 2e6e4693a7
commit 8e035dde96
350 changed files with 1908 additions and 1328 deletions

View File

@@ -16,8 +16,8 @@
ARG BUILD_FROM
ARG BUILD_VERSION
ARG BUILD_UPSTREAM="1.17.1"
FROM ${BUILD_FROM}:${BUILD_UPSTREAM}
ARG BUILD_UPSTREAM="2.0.0b1"
FROM ${BUILD_FROM}
##################
# 2 Modify Image #
@@ -28,10 +28,9 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0
# Add custom scripts
#RUN \
# sed -i '/Paperless-ngx docker container starting/a /./ha_entrypoint.sh' /sbin/docker-entrypoint.sh
#&& \
# Correct pre-encoded paths
# for file in $(grep -sril "/usr/src/paperless/" /sbin /usr); do sed -i "s=/usr/src/paperless/=/config/=g" "$file"; done
##################
# 3 Install apps #
@@ -41,18 +40,18 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
COPY rootfs/ /
# Modules
ARG MODULES="00-banner.sh 01-custom_script.sh 00-local_mounts.sh 00-smb_mounts.sh 01-config_yaml.sh"
ARG MODULES="00-banner.sh 00-local_mounts.sh 00-smb_mounts.sh 01-custom_script.sh"
# Automatic modules download
ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh"
RUN /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
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
# Manual apps
ENV PACKAGES="redis-server yamllint pip libxml2-dev libxslt-dev python-dev libjpeg-dev zlib1g-dev python3-dev build-essential nginx"
ENV PACKAGES="redis-server"
# Automatic apps & bashio
ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
RUN /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
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
################
# 4 Entrypoint #
@@ -60,14 +59,17 @@ RUN /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
# Add entrypoint
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
# Entrypoint modifications
ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh"
RUN /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.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 custom scripts
# RUN sed -i "2a source /ha_entrypoint.sh" /sbin/docker-entrypoint.sh && \
# sed -i 's=/./=source /=g' /ha_entrypoint.sh && \
# sed -i "s=env bash=env bashio=g" /sbin/docker-entrypoint.sh
#WORKDIR /
ENTRYPOINT [ "/usr/bin/env" ]
CMD [ "/ha_entrypoint.sh" ]
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]