Skip to content

Commit 7b8e6bc

Browse files
authored
Merge pull request #56 from github/node-16-in-codespaces
Add a .devcontainer
2 parents b4f2dbb + 08ab459 commit 7b8e6bc

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
4+
ARG VARIANT="16"
5+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>
10+
11+
# [Optional] Uncomment if you want to install an additional version of node using nvm
12+
# ARG EXTRA_NODE_VERSION=10
13+
# RUN su node -c "source/usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
14+
15+
# [Optional] Uncomment if you want to install more global node modules
16+
# RUN su node -c "npm install -g <your-package-list-here>"

.devcontainer/devcontainer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node
3+
{
4+
"name": "Node.js",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
8+
// Append -bullseye or -buster to pin to an OS version.
9+
// Use -bullseye variants on local arm64/Apple Silicon.
10+
"args": { "VARIANT": "16" }
11+
},
12+
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {},
15+
16+
// Add the IDs of extensions you want installed when the container is created.
17+
"extensions": [
18+
"dbaeumer.vscode-eslint"
19+
],
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
23+
24+
// Use 'postCreateCommand' to run commands after the container is created.
25+
// "postCreateCommand": "yarn install",
26+
27+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
28+
"remoteUser": "node",
29+
"features": {
30+
"git": "latest"
31+
}
32+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy