From be0079ed970cf0b58c278721400de1c9d4e6372b Mon Sep 17 00:00:00 2001 From: tommy Date: Sat, 4 Jan 2025 00:11:22 +0000 Subject: [PATCH] revert d9f90b7ecf1d678305708be1f44e701bd834ebba revert Update apps/home-assistant/Dockerfile --- apps/home-assistant/Dockerfile | 41 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/apps/home-assistant/Dockerfile b/apps/home-assistant/Dockerfile index 64505a5..398da51 100644 --- a/apps/home-assistant/Dockerfile +++ b/apps/home-assistant/Dockerfile @@ -16,14 +16,15 @@ ENV \ CRYPTOGRAPHY_DONT_BUILD_RUST=1 \ HOMEASSISTANT_WHEELS="https://wheels.home-assistant.io/musllinux/" \ HOME="/config" \ - PYTHONPATH="/config/deps" \ - UMASK="0002" \ + PYTHONPATH="/config/deps" + +ENV UMASK="0002" \ TZ="Etc/UTC" USER root WORKDIR /app -# hadolint ignore=DL3018,DL3013,DL3059,DL4006 +#hadolint ignore=DL3018,DL3013,DL3059,DL4006 RUN \ apk add --no-cache \ bash \ @@ -32,7 +33,8 @@ RUN \ bluez-deprecated \ bluez-libs \ ca-certificates \ - tini \ # <--- Install Tini here + catatonit \ + tini \ coreutils \ cups-libs \ curl \ @@ -75,9 +77,9 @@ RUN \ postgresql-dev \ unixodbc-dev \ && \ - pip install uv \ + rm -rf /config/deps/orjson || true \ && \ - uv pip install orjson \ + pip install uv orjson \ && \ curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \ | tar xzf - -C /tmp --strip-components=1 \ @@ -92,26 +94,25 @@ RUN \ && \ uv pip install --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \ homeassistant=="${VERSION}" \ - && \ - curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_amd64 --output /bin/go2rtc \ - && \ - chmod +x /bin/go2rtc \ - && \ - mkdir -p /config && chown nobody:nogroup -R /config \ - && \ - apk del --purge .build-deps \ - && \ - rm -rf /root/.cache /root/.cargo /tmp/* + && curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_amd64 --output /bin/go2rtc \ + && chmod +x /bin/go2rtc \ + && mkdir -p /config && chown nobody:nogroup -R /config \ + && apk del --purge .build-deps \ + && rm -rf /root/.cache /root/.cargo /tmp/* COPY ./entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -# Switch to a non-root user, if desired +# Ensure permissions for entrypoint +RUN chmod +x /entrypoint.sh \ + && chmod +x /usr/bin/catatonit \ + && chmod +x /sbin/tini + USER nobody:nogroup WORKDIR /config VOLUME ["/config"] -# Use Tini as the init system -ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] +# Use tini as fallback if catatonit fails +ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"] +CMD ["/sbin/tini", "--", "/entrypoint.sh"] LABEL org.opencontainers.image.source="https://github.com/home-assistant/core"