Skip to content

Commit 83d7208

Browse files
build(env): set up development environment
Signed-off-by: Jason <jagoodse@microsoft.com>
1 parent 6f613cd commit 83d7208

File tree

1 file changed

+75
-3
lines changed

1 file changed

+75
-3
lines changed

.devcontainer.json

+75-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,93 @@
55

66
// Features to add to the dev container. More info: https://containers.dev/features.
77
"features": {
8+
"ghcr.io/devcontainers/features/common-utils:2": {
9+
"installZsh": true,
10+
"configureZshAsDefaultShell": true,
11+
"installOhMyZsh": true,
12+
"upgradePackages": true,
13+
"username": "vscode",
14+
"userUid": "automatic",
15+
"userGid": "automatic"
16+
},
17+
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
18+
"plugins": "ssh-agent npm zsh-syntax-highlighting zsh-autosuggestions",
19+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-syntax-highlighting",
20+
"username": "vscode"
21+
},
822
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
923
"moby": false
1024
},
25+
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
26+
"packages": "skopeo"
27+
},
28+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:latest": {},
1129
"ghcr.io/rio/features/k3d:1": {},
1230
"ghcr.io/rio/features/k9s:1": {},
13-
"ghcr.io/rio/features/kustomize:1": {}
31+
"ghcr.io/rio/features/kustomize:1": {},
32+
"ghcr.io/jsburckhardt/devcontainer-features/notation:1": {}
1433
},
1534

1635
// Configure tool-specific properties.
1736
"customizations": {
1837
// Configure properties specific to VS Code.
1938
"vscode": {
20-
"settings": {},
39+
"settings": {
40+
"files.insertFinalNewline": true,
41+
"go.toolsManagement.checkForUpdates": "local",
42+
"go.useLanguageServer": true,
43+
"go.gopath": "/go",
44+
"go.lintTool": "revive",
45+
"go.goroot": "/usr/local/go",
46+
"go.lintFlags": [
47+
"--fast"
48+
],
49+
"[go]": {
50+
"editor.formatOnSave": true,
51+
"editor.codeActionsOnSave": {
52+
"source.organizeImports": true
53+
},
54+
// Optional: Disable snippets, as they conflict with completion ranking.
55+
"editor.snippetSuggestions": "none"
56+
},
57+
"[go.mod]": {
58+
"editor.formatOnSave": true,
59+
"editor.codeActionsOnSave": {
60+
"source.organizeImports": true
61+
}
62+
},
63+
"gopls": {
64+
// Add parameter placeholders when completing a function.
65+
"usePlaceholders": true,
66+
// If true, enable additional analyses with staticcheck.
67+
// Warning: This will significantly increase memory usage.
68+
"staticcheck": false
69+
},
70+
"terminal.integrated.profiles.linux": {
71+
"zsh": {
72+
"path": "/usr/bin/zsh"
73+
}
74+
},
75+
"terminal.integrated.defaultProfile.linux": "zsh"
76+
},
77+
78+
// Add the IDs of extensions you want installed when the container is created.
2179
"extensions": [
80+
"oderwat.indent-rainbow",
81+
"golang.go",
82+
"ms-vscode.go",
83+
"shardulm94.trailing-spaces",
84+
"timonwong.shellcheck"
2285
]
2386
}
2487
},
25-
}
88+
89+
"runArgs": [
90+
"--cap-add=SYS_PTRACE",
91+
"--security-opt",
92+
"seccomp=unconfined",
93+
"--network=host"
94+
],
95+
96+
"remoteUser": "vscode"
97+
}

0 commit comments

Comments
 (0)