mirror of
https://github.com/hacs/integration.git
synced 2025-08-16 17:12:38 +00:00
Speed up action container (#4035)
* Speed up action container * fix version
This commit is contained in:
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@ -0,0 +1,6 @@
|
||||
*
|
||||
!custom_components/hacs
|
||||
!scripts
|
||||
!action
|
||||
!constraints.txt
|
||||
!requirements_action.txt
|
@ -1,12 +1,17 @@
|
||||
FROM python:3.12-alpine
|
||||
FROM python:alpine
|
||||
|
||||
WORKDIR /hacs
|
||||
|
||||
COPY . /hacs
|
||||
|
||||
ENV PIP_EXTRA_INDEX_URL="https://wheels.home-assistant.io/musllinux-index/"
|
||||
ENV \
|
||||
UV_SYSTEM_PYTHON=true \
|
||||
PIP_EXTRA_INDEX_URL="https://wheels.home-assistant.io/musllinux-index/" \
|
||||
UV_EXTRA_INDEX_URL="https://wheels.home-assistant.io/musllinux-index/"
|
||||
|
||||
RUN \
|
||||
--mount=from=ghcr.io/astral-sh/uv:0.2.27,source=/uv,target=/bin/uv \
|
||||
\
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
bash \
|
||||
\
|
||||
@ -21,6 +26,10 @@ RUN \
|
||||
\
|
||||
&& find /usr/local \( -type d -a -name test -o -name tests -o -name '__pycache__' \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \; \
|
||||
\
|
||||
&& cp /hacs/action/action.py /hacs/action.py
|
||||
&& mv /hacs/action/action.py /hacs/action.py \
|
||||
\
|
||||
&& rm -rf /hacs/scripts /hacs/action \
|
||||
\
|
||||
&& rm /hacs/requirements_action.txt /hacs/constraints.txt
|
||||
|
||||
ENTRYPOINT ["python3", "/hacs/action.py"]
|
||||
|
8
scripts/install/uv_packages
Executable file
8
scripts/install/uv_packages
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
uv pip \
|
||||
install \
|
||||
--constraint constraints.txt \
|
||||
"${@}"
|
Reference in New Issue
Block a user