Update apps/home-assistant/Dockerfile

This commit is contained in:
Tommy 2025-01-04 09:58:24 +00:00
parent d6b9c5dc82
commit 5f2902f30e
Signed by: Mooo[bot]
GPG key ID: CF3AFE4D5B62BB9A

View file

@ -73,35 +73,16 @@ RUN \
libxslt-dev \
postgresql-dev \
unixodbc-dev \
&& \
pip install uv \
&& \
curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \
| tar xzf - -C /tmp --strip-components=1 \
&& \
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}" \
&& 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 --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
--requirement "https://raw.githubusercontent.com/home-assistant/docker/${HOME_ASSISTANT_BASE}/requirements.txt" \
&& \
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
--requirement /tmp/requirements_all.txt \
&& \
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
homeassistant=="${VERSION}" \
&& uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" --requirement /tmp/requirements_all.txt \
&& uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" homeassistant=="${VERSION}" \
&& 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
USER nobody:nogroup