Skip to content

Commit ed75d5e

Browse files
committed
Add the dev container for development.
1 parent 14f9da5 commit ed75d5e

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
3+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
4+
{
5+
"name": "Node.js",
6+
// https://github.com/devcontainers/templates/tree/main/src/javascript-node
7+
"image": "mcr.microsoft.com/devcontainers/javascript-node:16-bookworm",
8+
9+
// Features to add to the dev container. More info: https://containers.dev/features.
10+
// "features": {},
11+
12+
// Configure tool-specific properties.
13+
"customizations": {
14+
// Configure properties specific to VS Code.
15+
"vscode": {
16+
"settings": {
17+
// This is the key setting for VS Code to forward the host's SSH agent
18+
"terminal.integrated.inheritEnv": true,
19+
"dev.containers.copyGitConfig": true
20+
21+
},
22+
"extensions": [
23+
"streetsidesoftware.code-spell-checker"
24+
]
25+
}
26+
},
27+
28+
// Use 'portsAttributes' to set default properties for specific forwarded ports.
29+
// More info: https://containers.dev/implementors/json_reference/#port-attributes
30+
"portsAttributes": {
31+
"3000": {
32+
"label": "site",
33+
"onAutoForward": "openBrowser"
34+
}
35+
},
36+
37+
"mounts": [
38+
// Is currently in string format because consistency option is not yet supported in object format
39+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/node/.gitconfig,type=bind,consistency=cached"
40+
],
41+
42+
// Use 'postCreateCommand' to run commands after the container is created.
43+
"postCreateCommand": "yarn",
44+
45+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
46+
// "remoteUser": "root"
47+
48+
// SSH/Git commit signing
49+
"forwardPorts": [8080, 5432],
50+
"forward-ssh-agent": true
51+
}

0 commit comments

Comments
 (0)