From 86a955a2b4ae0ea07046d1d2a7d6a439de7c8854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 5 Jan 2026 16:10:39 +0100 Subject: [PATCH] Add PidsLimit to container creation for improved resource management --- containers/docker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/containers/docker.go b/containers/docker.go index 39d9b59..6b7e7cb 100644 --- a/containers/docker.go +++ b/containers/docker.go @@ -352,6 +352,8 @@ func (d *Driver) Create(name string, image string, volumePath string, HTTPPort i envList = append(envList, key+"="+value) } + pidLimit := int64(2024) + createdContainer, err := cli.ContainerCreate( context.Background(), &container.Config{ @@ -371,6 +373,7 @@ func (d *Driver) Create(name string, image string, volumePath string, HTTPPort i Memory: int64(memory*110/100) * 1024 * 1024, // Allow 10 % more memory so we have space for MemoryReservation MemoryReservation: int64(memory) * 1024 * 1024, // This should provide softer way how to limit the memory of our containers OomKillDisable: &OOMKillDisable, + PidsLimit: &pidLimit, }, PortBindings: portBindings, AutoRemove: false,