This commit is contained in:
Zengtudor 2024-12-29 17:01:53 +08:00
parent a04604774d
commit 06b0b6e0d7

View File

@ -1,6 +1,6 @@
services: services:
minecraft: minecraft:
image: chainguard/jre:latest image: openjdk:25-jdk-bookworm # 使用 JRE 版本的镜像
container_name: minecraft-server container_name: minecraft-server
working_dir: /mc-server working_dir: /mc-server
environment: environment:
@ -8,7 +8,7 @@ services:
volumes: volumes:
- ${MC_DIR}:/mc-server - ${MC_DIR}:/mc-server
command: > command: >
-jar ${JAR_FILE} nogui java -jar ${JAR_FILE} nogui
ports: ports:
- "25565:25565" - "25565:25565"
stdin_open: true stdin_open: true