mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Use www-data
This commit is contained in:
@@ -52,9 +52,7 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
|
|||||||
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
|
||||||
|
|
||||||
# Manual apps
|
# Manual apps
|
||||||
ENV PACKAGES="jq \
|
ENV PACKAGES="sudo"
|
||||||
curl \
|
|
||||||
cifs-utils"
|
|
||||||
|
|
||||||
# Automatic apps & bashio
|
# 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"
|
||||||
@@ -72,7 +70,14 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
|
|||||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/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
|
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
|
||||||
|
|
||||||
#
|
# Adapt shebang
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
RUN \
|
||||||
|
# Run as www-data
|
||||||
|
sed -i "s|/usr|exec sudo -Eu www-data /usr|g" /etc/s6*overlay/s6*/php-fpm/run && \
|
||||||
|
# Allow passwordless root
|
||||||
|
echo "www-data ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
#WORKDIR /
|
#WORKDIR /
|
||||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||||
#CMD [ "/ha_entrypoint.sh" ]
|
#CMD [ "/ha_entrypoint.sh" ]
|
||||||
@@ -115,4 +120,4 @@ LABEL \
|
|||||||
# RUN for folder in config db; do \
|
# RUN for folder in config db; do \
|
||||||
# echo "Adapting hard links" && \
|
# echo "Adapting hard links" && \
|
||||||
# grep -rl "/app/$folder" / 2>/dev/null | xargs sed -i "s|/app/$folder|/config/$folder|g"; \
|
# grep -rl "/app/$folder" / 2>/dev/null | xargs sed -i "s|/app/$folder|/config/$folder|g"; \
|
||||||
# done
|
# done
|
||||||
|
|||||||
Reference in New Issue
Block a user