-
Notifications
You must be signed in to change notification settings - Fork 36
/
Dockerfile
44 lines (36 loc) · 1017 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM mcr.microsoft.com/devcontainers/python:1-3.12
ENV \
DEBIAN_FRONTEND=noninteractive \
DEVCONTAINER=1 \
NVM_DIR="/root/.nvm"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install tools
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
dbus-daemon \
network-manager \
libpulse0 \
xz-utils
COPY ./common/rootfs /
COPY ./common/rootfs_supervisor /
COPY ./common/install /tmp/common/install
# Install common
RUN \
pip3 install --no-cache-dir uv \
&& bash devcontainer_init \
&& common_install_packages \
docker \
shellcheck \
cosign \
os-agent \
yarn \
&& usermod -aG docker vscode
COPY ./supervisor/rootfs /
# Set up venv for UV
USER vscode
ENV VIRTUAL_ENV="/home/vscode/.local/ha-venv"
RUN uv venv $VIRTUAL_ENV
# Setting PATH here isn't enough, VSCode rewites it after initial scripts finish
# Must also be set in remoteEnv in devcontainer.json
ENV PATH="$VIRTUAL_ENV/bin:$PATH"