2023-06-14 09:38:47 +00:00
|
|
|
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.11
|
2019-06-23 19:18:33 +00:00
|
|
|
|
2021-02-04 11:51:38 +00:00
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
|
2022-10-06 23:16:38 +00:00
|
|
|
# Uninstall pre-installed formatting and linting tools
|
|
|
|
# They would conflict with our pinned versions
|
2023-04-12 22:46:54 +00:00
|
|
|
RUN \
|
2023-11-27 13:38:59 +00:00
|
|
|
pipx uninstall pydocstyle \
|
2023-04-12 22:46:54 +00:00
|
|
|
&& pipx uninstall pycodestyle \
|
|
|
|
&& pipx uninstall mypy \
|
|
|
|
&& pipx uninstall pylint
|
2022-10-06 23:16:38 +00:00
|
|
|
|
2020-04-25 23:54:41 +00:00
|
|
|
RUN \
|
2021-02-04 11:51:38 +00:00
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
|
|
&& apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
2021-09-04 10:16:06 +00:00
|
|
|
# Additional library needed by some tests and accordingly by VScode Tests Discovery
|
|
|
|
bluez \
|
2023-12-30 12:14:49 +00:00
|
|
|
ffmpeg \
|
2019-07-12 07:16:14 +00:00
|
|
|
libudev-dev \
|
|
|
|
libavformat-dev \
|
|
|
|
libavcodec-dev \
|
|
|
|
libavdevice-dev \
|
|
|
|
libavutil-dev \
|
|
|
|
libswscale-dev \
|
|
|
|
libswresample-dev \
|
|
|
|
libavfilter-dev \
|
2021-02-11 23:17:49 +00:00
|
|
|
libpcap-dev \
|
2022-01-19 21:04:13 +00:00
|
|
|
libturbojpeg0 \
|
2022-06-13 18:44:46 +00:00
|
|
|
libyaml-dev \
|
2022-05-02 02:04:05 +00:00
|
|
|
libxml2 \
|
2019-07-12 07:16:14 +00:00
|
|
|
git \
|
2022-04-20 07:01:06 +00:00
|
|
|
cmake \
|
2019-06-23 19:18:33 +00:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2019-07-12 07:16:14 +00:00
|
|
|
WORKDIR /usr/src
|
|
|
|
|
2019-08-20 17:37:55 +00:00
|
|
|
# Setup hass-release
|
2019-07-12 07:16:14 +00:00
|
|
|
RUN git clone --depth 1 https://github.com/home-assistant/hass-release \
|
2020-04-27 10:09:31 +00:00
|
|
|
&& pip3 install -e hass-release/
|
2019-07-12 07:16:14 +00:00
|
|
|
|
2019-08-10 10:15:36 +00:00
|
|
|
WORKDIR /workspaces
|
2019-06-23 19:18:33 +00:00
|
|
|
|
2019-09-05 12:20:08 +00:00
|
|
|
# Install Python dependencies from requirements
|
2021-12-01 12:20:00 +00:00
|
|
|
COPY requirements.txt ./
|
2020-07-12 23:18:08 +00:00
|
|
|
COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt
|
2023-04-27 20:39:29 +00:00
|
|
|
RUN pip3 install -r requirements.txt
|
2021-12-01 12:20:00 +00:00
|
|
|
COPY requirements_test.txt requirements_test_pre_commit.txt ./
|
2023-04-27 20:39:29 +00:00
|
|
|
RUN pip3 install -r requirements_test.txt
|
2021-12-01 12:20:00 +00:00
|
|
|
RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/
|
2019-06-23 19:18:33 +00:00
|
|
|
|
|
|
|
# Set the default shell to bash instead of sh
|
|
|
|
ENV SHELL /bin/bash
|