Update apps/home-assistant/Dockerfile
This commit is contained in:
parent
2029e1796f
commit
282488dd33
1 changed files with 27 additions and 25 deletions
|
@ -12,11 +12,9 @@ ENV \
|
|||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
PIP_BREAK_SYSTEM_PACKAGES=1 \
|
||||
UV_SYSTEM_PYTHON=true \
|
||||
UV_NO_CACHE=true \
|
||||
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
|
||||
HOMEASSISTANT_WHEELS="https://wheels.home-assistant.io/musllinux/" \
|
||||
HOME="/config" \
|
||||
PYTHONPATH="/config/deps"
|
||||
HOME="/config"
|
||||
|
||||
ENV UMASK="0002" \
|
||||
TZ="Etc/UTC"
|
||||
|
@ -33,7 +31,7 @@ RUN \
|
|||
bluez-deprecated \
|
||||
bluez-libs \
|
||||
ca-certificates \
|
||||
tini \
|
||||
catatonit \
|
||||
coreutils \
|
||||
cups-libs \
|
||||
curl \
|
||||
|
@ -75,37 +73,41 @@ RUN \
|
|||
libxslt-dev \
|
||||
postgresql-dev \
|
||||
unixodbc-dev \
|
||||
&& rm -rf /config/deps/orjson || true \
|
||||
&& pip install uv \
|
||||
&& curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \
|
||||
&& \
|
||||
pip install uv \
|
||||
&& \
|
||||
curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \
|
||||
| tar xzf - -C /tmp --strip-components=1 \
|
||||
&& HOME_ASSISTANT_BASE=$(curl -fsSL "https://raw.githubusercontent.com/home-assistant/core/${VERSION}/build.yaml" | grep "amd64: " | cut -d ":" -f3) \
|
||||
&& uv pip install --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
||||
&& \
|
||||
case "${TARGETPLATFORM}" in \
|
||||
'linux/amd64') \
|
||||
export ARCH='amd64'; \
|
||||
;; \
|
||||
'linux/arm64') \
|
||||
export ARCH='aarch64'; \
|
||||
;; \
|
||||
esac \
|
||||
&& \
|
||||
HOME_ASSISTANT_BASE=$(curl -fsSL "https://raw.githubusercontent.com/home-assistant/core/${VERSION}/build.yaml" | grep "${ARCH}: " | cut -d ":" -f3) \
|
||||
&& \
|
||||
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
||||
--requirement "https://raw.githubusercontent.com/home-assistant/docker/${HOME_ASSISTANT_BASE}/requirements.txt" \
|
||||
&& uv pip install --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
||||
&& \
|
||||
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
||||
--requirement /tmp/requirements_all.txt \
|
||||
&& uv pip install --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
||||
&& \
|
||||
uv pip install --system --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 \
|
||||
&& uv pip install orjson --target /config/deps \
|
||||
&& chown nobody:nogroup -R /config \
|
||||
&& 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
|
||||
|
||||
# Ensure permissions for entrypoint
|
||||
RUN chmod +x /entrypoint.sh \
|
||||
&& chmod +x /sbin/tini
|
||||
COPY ./apps/home-assistant/entrypoint.sh /entrypoint.sh
|
||||
|
||||
USER nobody:nogroup
|
||||
WORKDIR /config
|
||||
VOLUME ["/config"]
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|
||||
#ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"]
|
||||
#CMD ["/sbin/tini", "--", "/entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/bin/catatonit", "--", "/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