From ed5061fd589a6351cad2208e7bb50ef3403db9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 25 Sep 2023 18:47:11 +0200 Subject: [PATCH] Disable OOM killer --- containers/docker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/containers/docker.go b/containers/docker.go index eb1f03f..0eacd43 100644 --- a/containers/docker.go +++ b/containers/docker.go @@ -338,6 +338,8 @@ func (d *Driver) Create(name string, image string, volumePath string, HTTPPort i } } + trueValue := true + createdContainer, err := cli.ContainerCreate( context.Background(), &container.Config{ @@ -356,6 +358,7 @@ func (d *Driver) Create(name string, image string, volumePath string, HTTPPort i CPUQuota: int64(CPU) * 1000, 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: &trueValue, }, PortBindings: portBindings, AutoRemove: false,