Update dev container (#849)

* Update dev container

* Address comments

* Add variant back to base file

* Remove variant from devcontainer.json
This commit is contained in:
Paulus Schoutsen 2021-03-14 03:39:47 -07:00 committed by GitHub
parent dace9e4721
commit 1221ccae4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 28 deletions

View File

@ -1,8 +1,14 @@
FROM node:lts
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/typescript-node/.devcontainer/base.Dockerfile
WORKDIR /workspaces
ARG VARIANT="14"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
# Set an environment variable to be able to detect we are in dev container
ENV NODE_ENV=devcontainer
EXPOSE 3000
COPY .nvmrc /tmp/.nvmrc
RUN \
su node -c \
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"

View File

@ -1,29 +1,29 @@
{
"name": "developers.home-assistant",
"dockerFile": "Dockerfile",
"appPort": [
3000
],
"postCreateCommand": "yarn install",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"appPort": [3000],
"postCreateCommand": "script/setup",
"extensions": [
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one"
"yzhang.markdown-all-in-one",
"esbenp.prettier-vscode"
],
"settings": {
"editor.rulers": [80, 100, 120],
"editor.renderWhitespace": "boundary",
"errorLens.gutterIconsEnabled": true,
"errorLens.addAnnotationTextPrefixes": false,
"errorLens.enabledDiagnosticLevels": [
"error",
"warning"
],
"terminal.integrated.shell.linux": "/bin/bash",
"errorLens.enabledDiagnosticLevels": ["error", "warning"],
"[markdown]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 80,
}
"editor.wordWrapColumn": 80
}
},
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}