diff --git a/apps/home-assistant/Dockerfile b/apps/home-assistant/Dockerfile index 398da51..64505a5 100644 --- a/apps/home-assistant/Dockerfile +++ b/apps/home-assistant/Dockerfile @@ -16,15 +16,14 @@ ENV \ CRYPTOGRAPHY_DONT_BUILD_RUST=1 \ HOMEASSISTANT_WHEELS="https://wheels.home-assistant.io/musllinux/" \ HOME="/config" \ - PYTHONPATH="/config/deps" - -ENV UMASK="0002" \ + PYTHONPATH="/config/deps" \ + 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 \ @@ -33,8 +32,7 @@ RUN \ bluez-deprecated \ bluez-libs \ ca-certificates \ - catatonit \ - tini \ + tini \ # <--- Install Tini here coreutils \ cups-libs \ curl \ @@ -77,9 +75,9 @@ RUN \ postgresql-dev \ unixodbc-dev \ && \ - rm -rf /config/deps/orjson || true \ + pip install uv \ && \ - pip install uv orjson \ + uv pip install orjson \ && \ curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \ | tar xzf - -C /tmp --strip-components=1 \ @@ -94,25 +92,26 @@ 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 -# Ensure permissions for entrypoint -RUN chmod +x /entrypoint.sh \ - && chmod +x /usr/bin/catatonit \ - && chmod +x /sbin/tini - +# Switch to a non-root user, if desired USER nobody:nogroup WORKDIR /config VOLUME ["/config"] -# Use tini as fallback if catatonit fails -ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"] -CMD ["/sbin/tini", "--", "/entrypoint.sh"] +# Use Tini as the init system +ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] LABEL org.opencontainers.image.source="https://github.com/home-assistant/core"