go20/day01/devcontainer/.devcontainer/devcontainer.json
yumaojun03 4cbf3531bc ```
feat(devcontainer): 优化 Go 开发容器配置并预装 VS Code Server

- 使用 ghcr.io/devcontainers/base:ubuntu 基础镜像并通过 Dev Containers Feature 安装 Go 1.25
- 在 Dockerfile 中预装 VS Code Server 避免运行时下载卡顿,支持 ARM64/AMD64 架构
- 自动安装 dlv 调试工具并配置 vscode 用户权限
- 更新 README 文档说明备用本地 Dockerfile 方案和预装 VS Code Server 选项
```
2025-12-29 15:23:36 +08:00

26 lines
587 B
JSON

{
"name": "Go Dev Container (demo)",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VSCODE_COMMIT": "994fd12f8d3a5aa16f17d42c041e5809167e845a"
}
},
"customizations": {
"vscode": {
"extensions": ["golang.go"],
"settings": {
"go.useLanguageServer": true,
"go.toolsManagement.autoUpdate": true,
"go.gopath": "/go",
"go.testFlags": ["-v"],
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"],
"[go]": {
"editor.formatOnSave": true
}
}
}
}
}