-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdevcontainer.json
More file actions
91 lines (91 loc) · 3.45 KB
/
Copy pathdevcontainer.json
File metadata and controls
91 lines (91 loc) · 3.45 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"name": "bucketeer",
"image": "ghcr.io/bucketeer-io/bucketeer-devcontainer:latest",
"privileged": true,
"capAdd": [
"SYS_ADMIN"
],
"securityOpt": [
"seccomp:unconfined"
],
"init": true,
"runArgs": [
"--cgroupns=host"
],
"mounts": [
// Persistent Go modules cache
"source=bucketeer-go-mod-cache,target=/go/pkg/mod,type=volume",
// Persistent Go tools cache
"source=bucketeer-go-tools,target=/home/codespace/go-tools,type=volume",
// Persistent Node.js cache for dashboard
"source=bucketeer-dashboard-node-modules,target=/workspaces/bucketeer/ui/dashboard/node_modules,type=volume",
// Persistent Node.js cache for evaluation typescript
"source=bucketeer-eval-ts-node-modules,target=/workspaces/bucketeer/evaluation/typescript/node_modules,type=volume",
// Persistent yarn cache
"source=bucketeer-yarn-cache,target=/home/codespace/.yarn/cache,type=volume",
// Persistent minikube cache to survive cluster deletions
"source=bucketeer-minikube-cache,target=/home/codespace/.minikube,type=volume",
// Persistent Docker image cache
"source=bucketeer-docker-cache,target=/var/lib/docker,type=volume"
],
"containerEnv": {
// Optimize Go module downloads
"GOPROXY": "https://proxy.golang.org,direct",
"GOSUMDB": "sum.golang.org",
// Optimize yarn installs
"YARN_CACHE_FOLDER": "/home/codespace/.yarn/cache"
},
"customizations": {
"codespaces": {
"openFiles": [
"README.md",
"DEVELOPMENT.md",
"Makefile"
]
},
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--config=${workspaceFolder}/.golangci.yml",
"--fast"
],
"go.formatTool": "goimports",
"[javascript][typescript][javascriptreact][typescriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.useFlatConfig": true
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"GitHub.vscode-pull-request-github",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
},
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
},
// Everything a container start must do, regardless of how the user connects.
// postAttachCommand (setup.sh) only fires when an editor client attaches, so
// `gh codespace ssh` sessions used to get no sshd, no Docker daemon and
// root-owned cache volumes. Each script owns one concern:
// start-sshd.sh - sshd, so `gh codespace ssh` can connect
// fix-permissions.sh - chown the mounted cache volumes to the container user
// start-docker.sh - align the iptables backend with the Codespaces host
// daemon, then start dockerd (the alignment must happen
// before dockerd starts or the nested daemon has no
// network at all)
"postStartCommand": "bash .devcontainer/start-sshd.sh && bash .devcontainer/fix-permissions.sh && bash .devcontainer/start-docker.sh",
"postAttachCommand": "bash .devcontainer/setup.sh"
}