From 9c8e8f1851989ca4f6f6cd4f36df89b2c722c133 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 16 Sep 2025 14:20:18 +0200 Subject: [PATCH] Reset --- guacamole/Dockerfile | 53 ++++++++++---------------------------------- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/guacamole/Dockerfile b/guacamole/Dockerfile index da6bfaaab..c663890a2 100644 --- a/guacamole/Dockerfile +++ b/guacamole/Dockerfile @@ -27,22 +27,19 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_SERVICES_GRACETIME=0 + ENV PGDATA=/config/postgres ENV GUACAMOLE_HOME=/config - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -#WORKDIR /config +WORKDIR /config # hadolint ignore=SC2016 RUN \ # Enable extensions sed -i 's|#!/usr/bin/with-contenv sh|#!/usr/bin/with-contenv bashio|g' /etc/cont-init.d/50-extensions.sh \ - && sed -i 's|$EXTENSIONS|$(bashio::config "EXTENSIONS")|g' /etc/cont-init.d/50-extensions.sh - -RUN \ + && sed -i 's|$EXTENSIONS|$(bashio::config "EXTENSIONS")|g' /etc/cont-init.d/50-extensions.sh \ + \ # Correct transfer - sed -i 's|cp -rn /app/guacamole|cp -rn /app/guacamole/*|g' /etc/cont-init.d/* \ + && sed -i 's|cp -rn /app/guacamole|cp -rn /app/guacamole/*|g' /etc/cont-init.d/* \ \ # avoid error && sed -i 's|(cat /config/\.database-version)|(cat /config/\.database-version \&>/dev/null)|g' /etc/cont-init.d/* \ @@ -57,10 +54,7 @@ RUN \ && sed -i '\|/usr/share/fonts|a\ \ \ \ \ \ \ \ /config/fonts' /etc/fonts/fonts.conf \ \ # Avoid https://github.com/alexbelgium/hassio-addons/issues/659 - && rm -r /run/shm \ - \ - # Avoid variable unset - && sed -i '1a set +u' /etc/services.d/guacamole/run + && rm -r /run/shm ################## # 3 Install apps # @@ -93,24 +87,18 @@ 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 -RUN ln -sf /usr/bin/env /usr/bin/with-contenv - -# Standalone bashio command -#ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/bashio-standalone.sh" "/.bashio-standalone.sh" -#RUN chmod 777 /.bashio-standalone.sh -#RUN sed -i "s|/usr/bin/with-contenv|/usr/bin/env|g" /etc/cont-init.d/* && \ -# sed -i "s|/usr/bin/with-contenv|/usr/bin/env|g" /etc/services.d/*/run && \ -# sed -i "s|/usr/bin/with-contenv|/usr/bin/env|g" /etc/services.d/*/run +# #WORKDIR /data -ENTRYPOINT [ "/usr/bin/env" ] -CMD [ "/ha_entrypoint.sh" ] +#ENTRYPOINT [ "/usr/bin/env" ] +#CMD [ "/ha_entrypoint.sh" ] +#SHELL ["/bin/bash", "-o", "pipefail", "-c"] ############ # 5 Labels # @@ -123,7 +111,6 @@ ARG BUILD_NAME ARG BUILD_REF ARG BUILD_REPOSITORY ARG BUILD_VERSION -ENV BUILD_VERSION="${BUILD_VERSION}" LABEL \ io.hass.name="${BUILD_NAME}" \ io.hass.description="${BUILD_DESCRIPTION}" \ @@ -147,22 +134,6 @@ LABEL \ # 6 Healthcheck # ################# -# Avoid spamming logs -# hadolint ignore=SC2016 -RUN \ - # Handle Apache configuration - if [ -d /etc/apache2/sites-available ]; then \ - for file in /etc/apache2/sites-*/*.conf; do \ - sed -i '/ /etc/nginx/nginx.conf.new && \ - mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \ - fi - ENV HEALTH_PORT="8080" \ HEALTH_URL="" HEALTHCHECK \ @@ -170,4 +141,4 @@ HEALTHCHECK \ --retries=5 \ --start-period=30s \ --timeout=25s \ - CMD curl -A "HealthCheck: Docker/1.0" -s -f "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1 + CMD curl --fail "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1