|
1 | 1 | { |
2 | 2 | "name": "bootc-devenv-debian", |
3 | | - // TODO override this back to prod image |
4 | 3 | "image": "ghcr.io/bootc-dev/devenv-debian", |
5 | 4 | "customizations": { |
6 | 5 | "vscode": { |
7 | | - // Abitrary, but most of our code is in one of these two |
| 6 | + // Arbitrary, but most of our code is in one of these two |
8 | 7 | "extensions": [ |
9 | 8 | "rust-lang.rust-analyzer", |
10 | 9 | "golang.Go" |
11 | 10 | ] |
| 11 | + }, |
| 12 | + "devaipod": { |
| 13 | + // When running under devaipod, use minimal capabilities |
| 14 | + // (SYS_ADMIN, NET_ADMIN, etc.) instead of full --privileged. |
| 15 | + "nestedContainers": true |
12 | 16 | } |
13 | 17 | }, |
14 | 18 | "features": {}, |
15 | | - "runArgs": [ |
16 | | - // In general we hope that the outer environment has set up |
17 | | - // a user namespace to keep this secure. |
18 | | - "--cap-add=all", |
19 | | - // Required for mounting /proc in nested user namespace |
20 | | - "--security-opt", "label=disable", |
21 | | - // Allows access to /proc paths needed for nested containers |
22 | | - "--security-opt", "unmask=/proc/*", |
23 | | - // Device access for nested containers and VMs |
24 | | - "--device", "/dev/net/tun", |
25 | | - // I always want KVM |
26 | | - "--device", "/dev/kvm" |
27 | | - ], |
| 19 | + // Use privileged mode for broad compatibility (Codespaces, Docker, |
| 20 | + // stock devcontainer CLI). devaipod overrides this with tighter |
| 21 | + // security via the nestedContainers customization above. |
| 22 | + "privileged": true, |
28 | 23 | "postCreateCommand": { |
29 | 24 | // Our init script |
30 | 25 | "devenv-init": "sudo /usr/local/bin/devenv-init.sh" |
|
33 | 28 | "PATH": "${containerEnv:PATH}:/usr/local/cargo/bin" |
34 | 29 | } |
35 | 30 | } |
36 | | - |
0 commit comments