Skip to content

Commit 9d3ab38

Browse files
committedDec 1, 2022
Add Dev Container Support
1 parent f2089ba commit 9d3ab38

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed
 

‎.devcontainer/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM mcr.microsoft.com/devcontainers/javascript-node:16-bullseye
2+
RUN npm install --global http-server

‎.devcontainer/devcontainer.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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/javascript-node
3+
{
4+
"name": "Node.js",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
},
8+
9+
// Features to add to the dev container. More info: https://containers.dev/features.
10+
// "features": {},
11+
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
15+
// Use 'postCreateCommand' to run commands after the container is created.
16+
// "postCreateCommand": "yarn install",
17+
18+
// Configure tool-specific properties.
19+
// "customizations": {},
20+
21+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
22+
// "remoteUser": "root"
23+
}

‎.vscode/launch.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"preLaunchTask":"go",
10+
"request": "launch",
11+
"name": "Launch Chrome against localhost",
12+
"url": "http://localhost:8080",
13+
"webRoot": "${workspaceFolder}"
14+
}
15+
]
16+
}

‎.vscode/tasks.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "go",
8+
"type": "shell",
9+
"command": "http-server"
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)
Please sign in to comment.