40 lines
1.9 KiB
JSON
40 lines
1.9 KiB
JSON
{
|
|
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
|
"runArgs": [
|
|
"--hostname=devcontainer-host",
|
|
"--name=${localWorkspaceFolderBasename}-devcontainer"
|
|
],
|
|
"forwardPorts": [4730, 4731, 5901],
|
|
"portsAttributes": {
|
|
"4730": { "label": "开发服务器端口", "onAutoForward": "notify" },
|
|
"4731": { "label": "预览服务器端口", "onAutoForward": "notify" }
|
|
},
|
|
"containerEnv": {
|
|
"TZ": "${localEnv:TZ:Asia/Shanghai}"
|
|
},
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": ["prettier.prettier-vscode", "vue.volar"],
|
|
"settings": {
|
|
// "tasks": { "version": "2.0.0", "tasks": [] },
|
|
"github.copilot.chat.codeGeneration.instructions": [
|
|
{
|
|
"text": "This dev container includes a lightweight Fluxbox based desktop that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS Code terminal will open on the desktop automatically."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"mounts": [
|
|
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume",
|
|
"source=${localWorkspaceFolder}/.devcontainer/lifecycle-scripts.d,target=/usr/local/etc/lifecycle-scripts.d,type=bind,consistency=delegated"
|
|
],
|
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=delegated",
|
|
"initializeCommand": "docker pull ghcr.io/yanhao98/h-devcontainer:main;",
|
|
"onCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh onCreateCommand",
|
|
"updateContentCommand": "/usr/local/bin/run-lifecycle-scripts.sh updateContentCommand",
|
|
"postCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh postCreateCommand",
|
|
"postStartCommand": "/usr/local/bin/run-lifecycle-scripts.sh postStartCommand",
|
|
"postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand"
|
|
}
|