Skip to content

Commit

Permalink
Constrain containers to 2gb ram and 2 threads
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfyScript committed Sep 6, 2023
1 parent b8c0c84 commit 67f5d93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ tasks.withType<Javadoc> {
}

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 {
Expand Down

0 comments on commit 67f5d93

Please sign in to comment.