2024-12-30 20:50:06 +00:00
|
|
|
FROM docker.io/library/python:3.13.1-alpine
|
|
|
|
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
ARG VERSION
|
|
|
|
ARG CHANNEL
|
|
|
|
|
|
|
|
ENV \
|
|
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
PYTHONUNBUFFERED=1 \
|
|
|
|
PIP_ROOT_USER_ACTION=ignore \
|
|
|
|
PIP_NO_CACHE_DIR=1 \
|
|
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
|
|
PIP_BREAK_SYSTEM_PACKAGES=1 \
|
|
|
|
UV_SYSTEM_PYTHON=true \
|
|
|
|
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
|
|
|
|
HOMEASSISTANT_WHEELS="https://wheels.home-assistant.io/musllinux/" \
|
2025-01-04 00:58:27 +00:00
|
|
|
HOME="/config"
|
2025-01-04 00:11:22 +00:00
|
|
|
|
|
|
|
ENV UMASK="0002" \
|
2024-12-30 20:50:06 +00:00
|
|
|
TZ="Etc/UTC"
|
|
|
|
|
|
|
|
USER root
|
|
|
|
WORKDIR /app
|
|
|
|
|
2025-01-04 10:09:15 +00:00
|
|
|
# hadolint ignore=DL3018,DL3013,DL3059,DL4006
|
2024-12-30 20:50:06 +00:00
|
|
|
RUN \
|
|
|
|
apk add --no-cache \
|
|
|
|
bash \
|
|
|
|
binutils \
|
|
|
|
bluez \
|
|
|
|
bluez-deprecated \
|
|
|
|
bluez-libs \
|
|
|
|
ca-certificates \
|
2025-01-04 10:09:15 +00:00
|
|
|
tini \
|
2024-12-30 20:50:06 +00:00
|
|
|
coreutils \
|
|
|
|
cups-libs \
|
|
|
|
curl \
|
|
|
|
eudev-libs \
|
|
|
|
ffmpeg \
|
|
|
|
git \
|
|
|
|
iputils \
|
|
|
|
jo \
|
|
|
|
jq \
|
|
|
|
libcap \
|
|
|
|
libjpeg-turbo-dev \
|
|
|
|
libpcap-dev \
|
|
|
|
libstdc++ \
|
|
|
|
libxslt \
|
|
|
|
mariadb-connector-c \
|
|
|
|
mariadb-connector-c-dev \
|
|
|
|
nano \
|
|
|
|
openssh-client \
|
|
|
|
openssl \
|
|
|
|
postgresql-libs \
|
|
|
|
socat \
|
|
|
|
tiff \
|
|
|
|
trurl \
|
|
|
|
tzdata \
|
|
|
|
unzip \
|
|
|
|
&& \
|
|
|
|
apk add --no-cache --virtual=.build-deps \
|
|
|
|
autoconf \
|
|
|
|
build-base \
|
|
|
|
cargo \
|
|
|
|
cmake \
|
|
|
|
cups-dev \
|
|
|
|
eudev-dev \
|
|
|
|
ffmpeg-dev \
|
|
|
|
glib-dev \
|
|
|
|
jpeg-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
postgresql-dev \
|
|
|
|
unixodbc-dev \
|
2025-01-04 09:58:24 +00:00
|
|
|
&& pip install uv \
|
2025-01-05 19:50:27 +00:00
|
|
|
&& uv pip install pymiele==0.2.0 flatdict==4.0.1 pyeasee==0.8.11 pyelectroluxgroup==0.2.1 homeassistant-cli \
|
2025-01-04 09:58:24 +00:00
|
|
|
&& curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" | tar xzf - -C /tmp --strip-components=1 \
|
2025-01-04 10:00:03 +00:00
|
|
|
&& HOME_ASSISTANT_BASE=$(curl -fsSL "https://raw.githubusercontent.com/home-assistant/core/${VERSION}/build.yaml" | grep "amd64: " | cut -d ":" -f3) \
|
2025-01-04 09:58:24 +00:00
|
|
|
&& uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
|
2024-12-30 20:50:06 +00:00
|
|
|
--requirement "https://raw.githubusercontent.com/home-assistant/docker/${HOME_ASSISTANT_BASE}/requirements.txt" \
|
2025-01-04 09:58:24 +00:00
|
|
|
&& 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}" \
|
2025-01-04 10:31:57 +00:00
|
|
|
&& curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_amd64 --output /bin/go2rtc \
|
|
|
|
&& chmod +x /bin/go2rtc \
|
2025-01-04 00:58:27 +00:00
|
|
|
&& mkdir -p /config && chown nobody:nogroup -R /config \
|
2025-01-04 00:11:22 +00:00
|
|
|
&& apk del --purge .build-deps \
|
|
|
|
&& rm -rf /root/.cache /root/.cargo /tmp/*
|
2025-01-04 09:45:59 +00:00
|
|
|
COPY ./entrypoint.sh /entrypoint.sh
|
2025-01-04 00:11:22 +00:00
|
|
|
|
2025-01-04 10:17:15 +00:00
|
|
|
RUN chmod +x /entrypoint.sh && \
|
2025-01-04 10:31:57 +00:00
|
|
|
chown nobody:nogroup /entrypoint.sh && \
|
|
|
|
chmod +x /sbin/tini
|
2025-01-04 10:17:15 +00:00
|
|
|
|
2024-12-30 20:50:06 +00:00
|
|
|
USER nobody:nogroup
|
|
|
|
WORKDIR /config
|
|
|
|
VOLUME ["/config"]
|
|
|
|
|
2025-01-04 10:09:15 +00:00
|
|
|
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|
2024-12-30 20:50:06 +00:00
|
|
|
|
2025-01-04 00:58:27 +00:00
|
|
|
LABEL org.opencontainers.image.source="https://github.com/home-assistant/core"
|