From 67f5d9307fd457430984dbee352ace1009668ad5 Mon Sep 17 00:00:00 2001 From: WolfyScript Date: Wed, 6 Sep 2023 18:28:15 +0200 Subject: [PATCH] Constrain containers to 2gb ram and 2 threads --- build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2cb4fac1..ef803721 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -105,7 +105,10 @@ tasks.withType { } minecraftDockerRun { - + val customEnv = env.get().toMutableMap() + customEnv["MEMORY"] = "2G" + env.set(customEnv) + arguments("--cpus", "2", "-it") // Constrain to only use 2 cpus, and allow for console interactivity with 'docker attach' } minecraftServers {