diff --git a/.devcontainer/devcontainer.json b/.devcontainer.json similarity index 69% rename from .devcontainer/devcontainer.json rename to .devcontainer.json index 3c53eacb7e..8fb163fb10 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer.json @@ -1,13 +1,20 @@ { "name": "Home Assistant Frontend", - "build": { - "dockerfile": "Dockerfile", - "context": ".." - }, + "image": "mcr.microsoft.com/devcontainers/python:0-3.10", "appPort": "8124:8123", "postCreateCommand": "script/bootstrap", "containerEnv": { - "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}" + "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}", + "DEVCONTAINER": "true" + }, + "remoteUser": "vscode", + "remoteEnv": { + "PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/node_modules/.bin:/home/vscode/.local/bin" + }, + "features": { + "ghcr.io/devcontainers/features/node:1": { + "version": "16" + } }, "customizations": { "vscode": { @@ -32,8 +39,7 @@ "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "files.trimTrailingWhitespace": true, - "terminal.integrated.shell.linux": "/usr/bin/zsh", + "terminal.integrated.defaultProfile.linux": "zsh", "gitlens.showWelcomeOnInstall": false, "gitlens.showWhatsNewAfterUpgrades": false, "workbench.startupEditor": "none" diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 4703666d12..0000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile -FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.10 - -ENV \ - DEBIAN_FRONTEND=noninteractive \ - DEVCONTAINER=true \ - PATH=$PATH:./node_modules/.bin - -# Install nvm -COPY .nvmrc /tmp/.nvmrc -RUN \ - su vscode -c \ - "source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1" \ No newline at end of file