parent
d9f90b7ecf
commit
be0079ed97
1 changed files with 21 additions and 20 deletions
|
@ -16,14 +16,15 @@ ENV \
|
||||||
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
|
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
|
||||||
HOMEASSISTANT_WHEELS="https://wheels.home-assistant.io/musllinux/" \
|
HOMEASSISTANT_WHEELS="https://wheels.home-assistant.io/musllinux/" \
|
||||||
HOME="/config" \
|
HOME="/config" \
|
||||||
PYTHONPATH="/config/deps" \
|
PYTHONPATH="/config/deps"
|
||||||
UMASK="0002" \
|
|
||||||
|
ENV UMASK="0002" \
|
||||||
TZ="Etc/UTC"
|
TZ="Etc/UTC"
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# hadolint ignore=DL3018,DL3013,DL3059,DL4006
|
#hadolint ignore=DL3018,DL3013,DL3059,DL4006
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
|
@ -32,7 +33,8 @@ RUN \
|
||||||
bluez-deprecated \
|
bluez-deprecated \
|
||||||
bluez-libs \
|
bluez-libs \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
tini \ # <--- Install Tini here
|
catatonit \
|
||||||
|
tini \
|
||||||
coreutils \
|
coreutils \
|
||||||
cups-libs \
|
cups-libs \
|
||||||
curl \
|
curl \
|
||||||
|
@ -75,9 +77,9 @@ RUN \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
unixodbc-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" \
|
curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \
|
||||||
| tar xzf - -C /tmp --strip-components=1 \
|
| tar xzf - -C /tmp --strip-components=1 \
|
||||||
|
@ -92,26 +94,25 @@ RUN \
|
||||||
&& \
|
&& \
|
||||||
uv pip install --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
uv pip install --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
||||||
homeassistant=="${VERSION}" \
|
homeassistant=="${VERSION}" \
|
||||||
&& \
|
&& curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_amd64 --output /bin/go2rtc \
|
||||||
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 \
|
||||||
chmod +x /bin/go2rtc \
|
&& apk del --purge .build-deps \
|
||||||
&& \
|
&& rm -rf /root/.cache /root/.cargo /tmp/*
|
||||||
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
|
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
|
USER nobody:nogroup
|
||||||
WORKDIR /config
|
WORKDIR /config
|
||||||
VOLUME ["/config"]
|
VOLUME ["/config"]
|
||||||
|
|
||||||
# Use Tini as the init system
|
# Use tini as fallback if catatonit fails
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"]
|
||||||
|
CMD ["/sbin/tini", "--", "/entrypoint.sh"]
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/home-assistant/core"
|
LABEL org.opencontainers.image.source="https://github.com/home-assistant/core"
|
||||||
|
|
Loading…
Reference in a new issue