revert Update apps/home-assistant/Dockerfile
This commit is contained in:
Tommy 2025-01-04 00:11:22 +00:00
parent d9f90b7ecf
commit be0079ed97
Signed by: Mooo[bot]
GPG key ID: CF3AFE4D5B62BB9A

View file

@ -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"