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_DISABLE_PIP_VERSION_CHECK=1 \
|
||||||
PIP_BREAK_SYSTEM_PACKAGES=1 \
|
PIP_BREAK_SYSTEM_PACKAGES=1 \
|
||||||
UV_SYSTEM_PYTHON=true \
|
UV_SYSTEM_PYTHON=true \
|
||||||
UV_NO_CACHE=true \
|
|
||||||
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"
|
|
||||||
|
|
||||||
ENV UMASK="0002" \
|
ENV UMASK="0002" \
|
||||||
TZ="Etc/UTC"
|
TZ="Etc/UTC"
|
||||||
|
@ -33,7 +31,7 @@ RUN \
|
||||||
bluez-deprecated \
|
bluez-deprecated \
|
||||||
bluez-libs \
|
bluez-libs \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
tini \
|
catatonit \
|
||||||
coreutils \
|
coreutils \
|
||||||
cups-libs \
|
cups-libs \
|
||||||
curl \
|
curl \
|
||||||
|
@ -75,37 +73,41 @@ RUN \
|
||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
unixodbc-dev \
|
unixodbc-dev \
|
||||||
&& rm -rf /config/deps/orjson || true \
|
&& \
|
||||||
&& pip install uv \
|
pip install uv \
|
||||||
&& 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 \
|
||||||
&& 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" \
|
--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 \
|
--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}" \
|
homeassistant=="${VERSION}" \
|
||||||
&& curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_amd64 --output /bin/go2rtc \
|
&& mkdir -p /config && chown nobody:nogroup -R /config \
|
||||||
&& chmod +x /bin/go2rtc \
|
|
||||||
&& mkdir -p /config \
|
|
||||||
&& uv pip install orjson --target /config/deps \
|
|
||||||
&& chown nobody:nogroup -R /config \
|
|
||||||
&& apk del --purge .build-deps \
|
&& apk del --purge .build-deps \
|
||||||
&& rm -rf /root/.cache /root/.cargo /tmp/*
|
&& rm -rf /root/.cache /root/.cargo /tmp/*
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./apps/home-assistant/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
# Ensure permissions for entrypoint
|
|
||||||
RUN chmod +x /entrypoint.sh \
|
|
||||||
&& chmod +x /sbin/tini
|
|
||||||
|
|
||||||
USER nobody:nogroup
|
USER nobody:nogroup
|
||||||
WORKDIR /config
|
WORKDIR /config
|
||||||
VOLUME ["/config"]
|
VOLUME ["/config"]
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/catatonit", "--", "/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