Skip to content

Commit 51ff181

Browse files
committed
dev: Limit devcontainer memory usage to 8GB (#1604)
Devconatiner memory usage is currently unbounded. This allows runaway processes (like rust-analyzer) to monopolize system resources, causing memory exhaustion for the host OS. This change adds a limit so that the oomkiller reaps devcontainer processes when they exceed 8GB. Signed-off-by: Oliver Gould <ver@buoyant.io>
1 parent 439b520 commit 51ff181

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// Support docker + debugger
1313
"runArgs": [
1414
"--init",
15+
// Limit container memory usage.
16+
"--memory=8g",
17+
"--memory-swap=8g",
1518
// Use the host network so we can access k3d, etc.
1619
"--net=host",
1720
// For lldb

0 commit comments

Comments
 (0)