From 590379665374f6c0c486f9afa9ed2f1e7eb01b75 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sat, 4 Jan 2025 12:56:47 +0800 Subject: [PATCH] update --- rxr_mc/docker-compose.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rxr_mc/docker-compose.yaml b/rxr_mc/docker-compose.yaml index 9fed4b4..bd9d2da 100644 --- a/rxr_mc/docker-compose.yaml +++ b/rxr_mc/docker-compose.yaml @@ -1,6 +1,7 @@ services: minecraft: - image: openjdk:17-jdk-slim # 使用 JRE 版本的镜像 + # image: openjdk:17-jdk-slim # 使用 JRE 版本的镜像 + image: azul/zulu-openjdk:17-jre-headless container_name: minecraft-server working_dir: /mc-server environment: @@ -8,13 +9,13 @@ services: volumes: - ${MC_DIR}:/mc-server command: > - java -Xmx7G -jar ${JAR_FILE} nogui + java -Xms -Xmx7G -jar ${JAR_FILE} nogui ports: - "25565:25565" stdin_open: true tty: true restart: always - mem_limit: 10G # 设置容器的内存限制为 10GB - memswap_limit: 10G # 禁止使用 swap,并确保总内存不超过 10GB + # mem_limit: 10G # 设置容器的内存限制为 10GB + # memswap_limit: 10G # 禁止使用 swap,并确保总内存不超过 10GB # oom_score_adj: -1000 stop_grace_period: 120s # 设置关闭宽限期为 120 秒