-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathdevcontainer.json
More file actions
70 lines (62 loc) · 1.99 KB
/
devcontainer.json
File metadata and controls
70 lines (62 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/go
{
"name": "dc-test",
"dockerFile": "Dockerfile",
"build": {
"args": {
"DOCKER_GID": "${localEnv:DOCKER_GID}"
},
"cacheFrom": "ghcr.io/devcontainers/ci/tests/docker-from-docker-non-root:latest"
},
"mounts": [
// Keep command history
"source=dc-test-bashhistory,target=/home/vscode/commandhistory",
// Mount host docker socket
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
],
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"files.eol": "\n",
"go.useLanguageServer": true,
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"gopls": {
"usePlaceholders": true, // add parameter placeholders when completing a function
// Experimental settings
"completeUnimported": true, // autocomplete unimported packages
"deepCompletion": true // enable deep completion
},
"go.delveConfig": {
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 1024,
"maxArrayValues": 64,
"maxStructFields": -1
},
"apiVersion": 2,
"showGlobalVariables": false,
"debugAdapter": "legacy"
}
},
// Add the IDs of extensions you want installed when the container is created.
// "extensions": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./scripts/go-tools.sh",
"postStartCommand": "echo 'UID INFO'; id; ls -l /var/run/docker.sock",
"remoteUser": "vscode",
"extensions": [
"golang.go",
"stuartleeks.vscode-go-by-example",
"ms-azuretools.vscode-docker",
]
}