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/" \ HOME="/config" ENV UMASK="0002" \ TZ="Etc/UTC" USER root WORKDIR /app # hadolint ignore=DL3018,DL3013,DL3059,DL4006 RUN \ apk add --no-cache \ bash \ binutils \ bluez \ bluez-deprecated \ bluez-libs \ ca-certificates \ tini \ 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 \ && 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}" \ && 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 RUN chmod +x /entrypoint.sh && \ chown nobody:nogroup /entrypoint.sh USER nobody:nogroup WORKDIR /config VOLUME ["/config"] ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] LABEL org.opencontainers.image.source="https://github.com/home-assistant/core"