2026-01-24 12:19:51 +00:00
|
|
|
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node
|
2019-06-23 21:18:33 +02:00
|
|
|
|
2021-02-04 12:51:38 +01:00
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
|
|
2026-01-24 12:19:51 +00:00
|
|
|
ARG USERNAME=node
|
|
|
|
|
|
2020-04-26 01:54:41 +02:00
|
|
|
RUN \
|
2025-09-04 00:23:45 -04:00
|
|
|
apt-get update \
|
2021-02-04 12:51:38 +01:00
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
2021-09-04 12:16:06 +02:00
|
|
|
# Additional library needed by some tests and accordingly by VScode Tests Discovery
|
|
|
|
|
bluez \
|
2023-12-30 13:14:49 +01:00
|
|
|
ffmpeg \
|
2019-07-12 09:16:14 +02:00
|
|
|
libudev-dev \
|
|
|
|
|
libavformat-dev \
|
|
|
|
|
libavcodec-dev \
|
|
|
|
|
libavdevice-dev \
|
|
|
|
|
libavutil-dev \
|
|
|
|
|
libswscale-dev \
|
|
|
|
|
libswresample-dev \
|
|
|
|
|
libavfilter-dev \
|
2021-02-12 00:17:49 +01:00
|
|
|
libpcap-dev \
|
2022-01-19 22:04:13 +01:00
|
|
|
libturbojpeg0 \
|
2022-06-13 08:44:46 -10:00
|
|
|
libyaml-dev \
|
2022-05-01 21:04:05 -05:00
|
|
|
libxml2 \
|
2019-07-12 09:16:14 +02:00
|
|
|
git \
|
2022-04-20 03:01:06 -04:00
|
|
|
cmake \
|
2025-07-02 10:40:16 +02:00
|
|
|
autoconf \
|
2019-06-23 21:18:33 +02:00
|
|
|
&& apt-get clean \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2024-11-11 20:13:20 +01:00
|
|
|
# Add go2rtc binary
|
|
|
|
|
COPY --from=ghcr.io/alexxit/go2rtc:latest /usr/local/bin/go2rtc /bin/go2rtc
|
|
|
|
|
|
2019-07-12 09:16:14 +02:00
|
|
|
WORKDIR /usr/src
|
|
|
|
|
|
2025-07-02 10:40:16 +02:00
|
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
|
|
2026-01-24 12:19:51 +00:00
|
|
|
USER $USERNAME
|
2025-10-09 12:25:59 -03:00
|
|
|
|
2026-01-24 12:19:51 +00:00
|
|
|
ENV VIRTUAL_ENV="/home/$USERNAME/.local/ha-venv"
|
2025-11-27 12:27:18 +01:00
|
|
|
RUN --mount=type=bind,source=.python-version,target=.python-version \
|
|
|
|
|
uv python install \
|
|
|
|
|
&& uv venv $VIRTUAL_ENV
|
2024-05-21 09:56:31 +02:00
|
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
|
|
2025-07-02 10:40:16 +02:00
|
|
|
# Setup hass-release
|
|
|
|
|
RUN git clone --depth 1 https://github.com/home-assistant/hass-release ~/hass-release \
|
|
|
|
|
&& uv pip install -e ~/hass-release/
|
|
|
|
|
|
2019-09-05 14:20:08 +02:00
|
|
|
# Install Python dependencies from requirements
|
2025-11-27 12:27:18 +01:00
|
|
|
RUN --mount=type=bind,source=requirements.txt,target=requirements.txt \
|
|
|
|
|
--mount=type=bind,source=homeassistant/package_constraints.txt,target=homeassistant/package_constraints.txt \
|
|
|
|
|
--mount=type=bind,source=requirements_test.txt,target=requirements_test.txt \
|
|
|
|
|
--mount=type=bind,source=requirements_test_pre_commit.txt,target=requirements_test_pre_commit.txt \
|
|
|
|
|
uv pip install -r requirements.txt -r requirements_test.txt
|
2024-05-21 09:56:31 +02:00
|
|
|
|
|
|
|
|
WORKDIR /workspaces
|
2019-06-23 21:18:33 +02:00
|
|
|
|
|
|
|
|
# Set the default shell to bash instead of sh
|
2025-07-02 10:40:16 +02:00
|
|
|
ENV SHELL=/bin/bash
|