Skip to content

Commit 0202494

Browse files
author
Craig Peters
committed
annotate the devcontainer
1 parent 338a6cb commit 0202494

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
{
2+
// See the devcontainer spec at https://containers.dev/implementors/spec/
3+
"name": "React Codespaces Template",
4+
5+
// Container image to build environment from
6+
// universal contains many tools making it useful in many contexts https://github.com/devcontainers/images/tree/main/src/universal
27
"image": "mcr.microsoft.com/devcontainers/universal:2",
8+
9+
// Specify the minimum machine spec for running the dev container
310
"hostRequirements": {
411
"cpus": 4
512
},
6-
"waitFor": "onCreateCommand",
13+
14+
// Upon Codespaces or image prebuild, refresh the npm and node.hs installation (async from environment creation)
715
"updateContentCommand": "npm install",
8-
"postCreateCommand": "",
16+
17+
// Upon environment create, and after the user session is created, run the server
918
"postAttachCommand": {
1019
"server": "npm start"
1120
},
21+
1222
"customizations": {
23+
// Configure Codespaces to open the application source on start
1324
"codespaces": {
1425
"openFiles": [
1526
"src/App.js"
1627
]
1728
}
1829
},
30+
31+
// Configure the environment to open a browser to the application on port 3000
1932
"portsAttributes": {
2033
"3000": {
2134
"label": "Application",

0 commit comments

Comments
 (0)