Skip to content

Commit 127767f

Browse files
authored
Add dev-container (#1702)
Helpful to provide an image when you want to run the codebase (including installling deps & extensions) inside a dev container, to avoid the codebase + extensions to impact the rest of your system. When opening the project, VSCode & Cursor will now prompt you to reopen the project in a dev container. There is also no need anymore to "trust" the codebase through VSCode's dialog
1 parent a825191 commit 127767f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"ghcr.io/joshuanianji/devcontainer-features/mount-pnpm-store:1": {}
11+
}
12+
13+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
14+
// "forwardPorts": [],
15+
16+
// Use 'postCreateCommand' to run commands after the container is created.
17+
// "postCreateCommand": "yarn install",
18+
19+
// Configure tool-specific properties.
20+
// "customizations": {},
21+
22+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
23+
// "remoteUser": "root"
24+
}

0 commit comments

Comments
 (0)