diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f636f18..dfbf178 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,12 @@ FROM ghcr.io/home-assistant/devcontainer:addons RUN \ apt-get update \ && apt-get install -y --no-install-recommends \ - python3-pip + python3-pip \ + python3-venv + +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" COPY script/requirements.txt / diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2ea3341..71de67e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,23 +14,28 @@ "containerEnv": { "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}" }, - "extensions": [ - "timonwong.shellcheck", - "esbenp.prettier-vscode" - ], - "mounts": [ - "type=volume,target=/var/lib/docker" - ], - "settings": { - "terminal.integrated.profiles.linux": { - "zsh": { - "path": "/usr/bin/zsh" + "customizations": { + "vscode": { + "extensions": [ + "timonwong.shellcheck", + "esbenp.prettier-vscode", + "ms-python.python" + ], + "mounts": [ + "type=volume,target=/var/lib/docker" + ], + "settings": { + "terminal.integrated.profiles.linux": { + "zsh": { + "path": "/usr/bin/zsh" + } + }, + "terminal.integrated.defaultProfile.linux": "zsh", + "editor.formatOnPaste": false, + "editor.formatOnSave": true, + "editor.formatOnType": true, + "files.trimTrailingWhitespace": true } - }, - "terminal.integrated.defaultProfile.linux": "zsh", - "editor.formatOnPaste": false, - "editor.formatOnSave": true, - "editor.formatOnType": true, - "files.trimTrailingWhitespace": true + } } }