Skip to content

Commit a6f72d9

Browse files
committed
chore(dev): update devcontainer definitions
1 parent 5fff4f4 commit a6f72d9

File tree

3 files changed

+62
-79
lines changed

3 files changed

+62
-79
lines changed

.devcontainer/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ It works on Linux, Windows and OSX.
2222
Note that the development container will create the empty directories `~/.docker`, `~/.ssh` and `~/.kube` if you don't have them.
2323
2424
1. **For Docker on OSX or Windows without WSL**: ensure your home directory `~` is accessible by Docker.
25-
1. **For Docker on Windows without WSL:** if you want to use SSH keys, bind mount your host `~/.ssh` to `/tmp/.ssh` instead of `~/.ssh` by changing the `volumes` section in the [docker-compose.yml](docker-compose.yml).
2625
1. Open the command palette in Visual Studio Code (CTRL+SHIFT+P).
2726
1. Select `Remote-Containers: Open Folder in Container...` and choose the project directory.
2827

.devcontainer/devcontainer.json

Lines changed: 60 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -11,77 +11,65 @@
1111
"postCreateCommand": "~/.windows.sh && go mod download && go mod tidy",
1212
"workspaceFolder": "/workspace",
1313
// "overrideCommand": "",
14-
"extensions": [
15-
"golang.go",
16-
"eamodio.gitlens", // IDE Git information
17-
"davidanson.vscode-markdownlint",
18-
"ms-azuretools.vscode-docker", // Docker integration and linting
19-
"shardulm94.trailing-spaces", // Show trailing spaces
20-
"Gruntfuggly.todo-tree", // Highlights TODO comments
21-
"bierner.emojisense", // Emoji sense for markdown
22-
"stkb.rewrap", // rewrap comments after n characters on one line
23-
"vscode-icons-team.vscode-icons", // Better file extension icons
24-
"github.vscode-pull-request-github", // Github interaction
25-
"redhat.vscode-yaml", // Kubernetes, Drone syntax highlighting
26-
"bajdzis.vscode-database", // Supports connections to mysql or postgres, over SSL, socked
27-
"IBM.output-colorizer", // Colorize your output/test logs
28-
// "mohsen1.prettify-json", // Prettify JSON data
29-
// "zxh404.vscode-proto3", // Supports Proto syntax
30-
// "jrebocho.vscode-random", // Generates random values
31-
// "alefragnani.Bookmarks", // Manage bookmarks
32-
// "quicktype.quicktype", // Paste JSON as code
33-
// "spikespaz.vscode-smoothtype", // smooth cursor animation
34-
],
35-
"settings": {
36-
"files.eol": "\n",
37-
"remote.extensionKind": {
38-
"ms-azuretools.vscode-docker": "workspace"
39-
},
40-
"editor.codeActionsOnSaveTimeout": 3000,
41-
"go.useLanguageServer": true,
42-
"[go]": {
43-
"editor.formatOnSave": true,
44-
"editor.codeActionsOnSave": {
45-
"source.organizeImports": true,
46-
},
47-
// Optional: Disable snippets, as they conflict with completion ranking.
48-
"editor.snippetSuggestions": "none"
49-
},
50-
"[go.mod]": {
51-
"editor.formatOnSave": true,
52-
"editor.codeActionsOnSave": {
53-
"source.organizeImports": true,
54-
},
55-
},
56-
"gopls": {
57-
"usePlaceholders": false,
58-
"staticcheck": true
59-
},
60-
"go.autocompleteUnimportedPackages": true,
61-
"go.gotoSymbol.includeImports": true,
62-
"go.gotoSymbol.includeGoroot": true,
63-
"go.lintTool": "golangci-lint",
64-
"go.buildOnSave": "workspace",
65-
"go.lintOnSave": "workspace",
66-
"go.vetOnSave": "workspace",
67-
"editor.formatOnSave": true,
68-
"go.toolsEnvVars": {
69-
"GOFLAGS": "-tags=",
70-
"CGO_ENABLED": 1 // for the race detector
71-
},
72-
"gopls.env": {
73-
"GOFLAGS": "-tags="
74-
},
75-
"go.testEnvVars": {
76-
"": "",
77-
},
78-
"go.testFlags": [
79-
"-v",
80-
"-race"
81-
],
82-
"go.testTimeout": "10s",
83-
"go.coverOnSingleTest": true,
84-
"go.coverOnSingleTestFile": true,
85-
"go.coverOnTestPackage": true
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"golang.go",
18+
"eamodio.gitlens", // IDE Git information
19+
"davidanson.vscode-markdownlint",
20+
"ms-azuretools.vscode-docker", // Docker integration and linting
21+
"shardulm94.trailing-spaces", // Show trailing spaces
22+
"Gruntfuggly.todo-tree", // Highlights TODO comments
23+
"bierner.emojisense", // Emoji sense for markdown
24+
"stkb.rewrap", // rewrap comments after n characters on one line
25+
"vscode-icons-team.vscode-icons", // Better file extension icons
26+
"github.vscode-pull-request-github", // Github interaction
27+
"redhat.vscode-yaml", // Kubernetes, Drone syntax highlighting
28+
"bajdzis.vscode-database", // Supports connections to mysql or postgres, over SSL, socked
29+
"IBM.output-colorizer", // Colorize your output/test logs
30+
"github.copilot" // AI code completion
31+
// "mohsen1.prettify-json", // Prettify JSON data
32+
// "zxh404.vscode-proto3", // Supports Proto syntax
33+
// "jrebocho.vscode-random", // Generates random values
34+
// "alefragnani.Bookmarks", // Manage bookmarks
35+
// "quicktype.quicktype", // Paste JSON as code
36+
// "spikespaz.vscode-smoothtype", // smooth cursor animation
37+
],
38+
"settings": {
39+
"files.eol": "\n",
40+
"editor.formatOnSave": true,
41+
"go.buildTags": "",
42+
"go.toolsEnvVars": {
43+
"CGO_ENABLED": "0"
44+
},
45+
"go.useLanguageServer": true,
46+
"go.testEnvVars": {
47+
"CGO_ENABLED": "1"
48+
},
49+
"go.testFlags": [
50+
"-v",
51+
"-race"
52+
],
53+
"go.testTimeout": "10s",
54+
"go.coverOnSingleTest": true,
55+
"go.coverOnSingleTestFile": true,
56+
"go.coverOnTestPackage": true,
57+
"go.lintTool": "golangci-lint",
58+
"go.lintOnSave": "package",
59+
"[go]": {
60+
"editor.codeActionsOnSave": {
61+
"source.organizeImports": true
62+
}
63+
},
64+
"gopls": {
65+
"usePlaceholders": false,
66+
"staticcheck": true,
67+
"vulncheck": "Imports"
68+
},
69+
"remote.extensionKind": {
70+
"ms-azuretools.vscode-docker": "workspace"
71+
}
72+
}
73+
}
8674
}
8775
}

.devcontainer/docker-compose.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ services:
55
build: .
66
volumes:
77
- ../:/workspace
8-
# Docker
9-
- ~/.docker:/root/.docker:z
108
# Docker socket to access Docker server
119
- /var/run/docker.sock:/var/run/docker.sock
1210
# SSH directory for Linux, OSX and WSL
@@ -15,11 +13,9 @@ services:
1513
# from /mnt/ssh to ~/.ssh to fix permissions.
1614
- ~/.ssh:/mnt/ssh
1715
# Shell history persistence
18-
- ~/.zsh_history:/root/.zsh_history:z
16+
- ~/.zsh_history:/root/.zsh_history
1917
# Git config
20-
- ~/.gitconfig:/root/.gitconfig:z
21-
# Kubernetes
22-
- ~/.kube:/root/.kube:z
18+
- ~/.gitconfig:/root/.gitconfig
2319
environment:
2420
- TZ=
2521
cap_add:

0 commit comments

Comments
 (0)