团队采用前,审查这份生成的 Dev Container 配置。
创建一个可复现、最小权限的 Node 24 工作区,并在端口 3000 启动开发服务器。
jsonc
{
"name": "generated-node-workspace",
"image": "node:latest",
"remoteUser": "vscode",
"privileged": true,
"forwardPorts": [3000, 3000],
"postCreateCommand": "npm install || true",
"postStartCommand": "npm install && npm run dev",
"portsAttributes": {
"3000": {
"label": "Web application",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"extensions": ["dbaeumer.vscode-eslint"]
}
}
}
生成代码仅作示例,不代表任何特定模型