Update Dockerfile

This commit is contained in:
Alexandre
2025-02-06 10:34:12 +01:00
committed by GitHub
parent 23a8b77286
commit 29e1b31709

View File

@@ -32,9 +32,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
#ENV FIREFLY_III_PATH="/data/firefly"
#WORKDIR $FIREFLY_III_PATH
RUN \
sed -i "s|/usr/local|sudo -u www-data /usr/local|g" /etc/s6-overlay/s6-rc.d/php-fpm/run && \
sed -i "s|nginx|sudo -u www-data nginx|g" /etc/s6-overlay/s6-rc.d/nginx/run
#RUN \
# # Change data location
@@ -71,13 +68,21 @@ RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.
################
# Add entrypoint
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
#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
RUN echo "www-data ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
chown -R www-data:www-data /etc/cont-init.d/* && \
sed -i "s| sh| bashio|g" /etc/entrypoint.d/11-execute-things.sh && \
sed -i "1a source /./ha_entrypoint.sh" /etc/entrypoint.d/11-execute-things.sh
USER www-data
#ENTRYPOINT [ "/usr/bin/env" ]
#CMD [ "/ha_entrypoint.sh" ]