See [release notes](https://github.com/qdm12/godevcontainer/releases/tag/v0.21.0) Notably: - Go upgraded from 1.23 to 1.25 - golangci-lint upgraded to v2.4.0 - Alpine upgraded from 3.20 to 3.22 - Disable package comment requirement by gopls' staticcheck - Pull container image from ghcr.io
111 lines
3.9 KiB
JSON
111 lines
3.9 KiB
JSON
{
|
|
"name": "gluetun-dev",
|
|
// User defined settings
|
|
"containerEnv": {
|
|
"TZ": ""
|
|
},
|
|
// Fixed settings
|
|
"build": {
|
|
"dockerfile": "./Dockerfile"
|
|
},
|
|
"postCreateCommand": "~/.windows.sh && go mod download",
|
|
"capAdd": [
|
|
"NET_ADMIN", // Gluetun specific
|
|
"SYS_PTRACE" // for dlv Go debugging
|
|
],
|
|
"securityOpt": [
|
|
"seccomp=unconfined" // for dlv Go debugging
|
|
],
|
|
"mounts": [
|
|
// Zsh commands history persistence
|
|
{
|
|
"source": "${localEnv:HOME}/.zsh_history",
|
|
"target": "/root/.zsh_history",
|
|
"type": "bind"
|
|
},
|
|
// Git configuration file
|
|
{
|
|
"source": "${localEnv:HOME}/.gitconfig",
|
|
"target": "/root/.gitconfig",
|
|
"type": "bind"
|
|
},
|
|
// SSH directory for Linux, OSX and WSL
|
|
// On Linux and OSX, a symlink /mnt/ssh <-> ~/.ssh is
|
|
// created in the container. On Windows, files are copied
|
|
// from /mnt/ssh to ~/.ssh to fix permissions.
|
|
{
|
|
"source": "${localEnv:HOME}/.ssh",
|
|
"target": "/mnt/ssh",
|
|
"type": "bind"
|
|
},
|
|
// Docker socket to access the host Docker server
|
|
{
|
|
"source": "/var/run/docker.sock",
|
|
"target": "/var/run/docker.sock",
|
|
"type": "bind"
|
|
}
|
|
],
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"golang.go",
|
|
"eamodio.gitlens", // IDE Git information
|
|
"davidanson.vscode-markdownlint",
|
|
"ms-azuretools.vscode-docker", // Docker integration and linting
|
|
"shardulm94.trailing-spaces", // Show trailing spaces
|
|
"Gruntfuggly.todo-tree", // Highlights TODO comments
|
|
"bierner.emojisense", // Emoji sense for markdown
|
|
"stkb.rewrap", // rewrap comments after n characters on one line
|
|
"vscode-icons-team.vscode-icons", // Better file extension icons
|
|
"github.vscode-pull-request-github", // Github interaction
|
|
"redhat.vscode-yaml", // Kubernetes, Drone syntax highlighting
|
|
"bajdzis.vscode-database", // Supports connections to mysql or postgres, over SSL, socked
|
|
"IBM.output-colorizer", // Colorize your output/test logs
|
|
"github.copilot" // AI code completion
|
|
],
|
|
"settings": {
|
|
"files.eol": "\n",
|
|
"remote.extensionKind": {
|
|
"ms-azuretools.vscode-docker": "workspace"
|
|
},
|
|
"go.useLanguageServer": true,
|
|
"[go]": {
|
|
"editor.codeActionsOnSave": {
|
|
"source.organizeImports": "explicit"
|
|
}
|
|
},
|
|
"[go.mod]": {
|
|
"editor.codeActionsOnSave": {
|
|
"source.organizeImports": "explicit"
|
|
}
|
|
},
|
|
"gopls": {
|
|
"usePlaceholders": false,
|
|
"staticcheck": true,
|
|
"ui.diagnostic.analyses": {
|
|
"ST1000": false
|
|
},
|
|
"formatting.gofumpt": true,
|
|
},
|
|
"go.lintTool": "golangci-lint",
|
|
"go.lintOnSave": "package",
|
|
"editor.formatOnSave": true,
|
|
"go.buildTags": "linux",
|
|
"go.toolsEnvVars": {
|
|
"CGO_ENABLED": "0"
|
|
},
|
|
"go.testEnvVars": {
|
|
"CGO_ENABLED": "1"
|
|
},
|
|
"go.testFlags": [
|
|
"-v",
|
|
"-race"
|
|
],
|
|
"go.testTimeout": "10s",
|
|
"go.coverOnSingleTest": true,
|
|
"go.coverOnSingleTestFile": true,
|
|
"go.coverOnTestPackage": true
|
|
}
|
|
}
|
|
}
|
|
} |