Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
paths:
- 'devenv/**'
- '.devcontainer/**'
- 'common/.devcontainer/**'
- '.github/workflows/test-devcontainer.yml'
- 'Justfile'
Expand Down
26 changes: 10 additions & 16 deletions common/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
{
"name": "bootc-devenv-debian",
// TODO override this back to prod image
"image": "ghcr.io/bootc-dev/devenv-debian",
"customizations": {
"vscode": {
// Abitrary, but most of our code is in one of these two
// Arbitrary, but most of our code is in one of these two
"extensions": [
"rust-lang.rust-analyzer",
"golang.Go"
]
},
"devaipod": {
// When running under devaipod, use minimal capabilities
// (SYS_ADMIN, NET_ADMIN, etc.) instead of full --privileged.
"nestedContainers": true
}
},
"features": {},
"runArgs": [
// In general we hope that the outer environment has set up
// a user namespace to keep this secure.
"--cap-add=all",
// Required for mounting /proc in nested user namespace
"--security-opt", "label=disable",
// Allows access to /proc paths needed for nested containers
"--security-opt", "unmask=/proc/*",
// Device access for nested containers and VMs
"--device", "/dev/net/tun",
// I always want KVM
"--device", "/dev/kvm"
],
// Use privileged mode for broad compatibility (Codespaces, Docker,
// stock devcontainer CLI). devaipod overrides this with tighter
// security via the nestedContainers customization above.
"privileged": true,
"postCreateCommand": {
// Our init script
"devenv-init": "sudo /usr/local/bin/devenv-init.sh"
Expand All @@ -33,4 +28,3 @@
"PATH": "${containerEnv:PATH}:/usr/local/cargo/bin"
}
}