From 8c467adef8b90b3eaf04e36af31abd7a9619ae3e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 14 Feb 2023 01:37:11 +0000 Subject: [PATCH] wrote docker files during ops ig --- Dockerfile | 12 ++++++++++++ docker-compose.yaml | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bfef494 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM debian:latest + +RUN apt-get update && apt-get install -y curl openjdk-17-jdk + +RUN mkdir -p /minecraft +WORKDIR /minecraft + +RUN curl -LOJ https://piston-data.mojang.com/v1/objects/c9df48efed58511cdd0213c56b9013a7b5c9ac1f/server.jar + +RUN echo "eula=true" > eula.txt + +CMD java -Xmx15000M -Xms15000M -jar /minecraft/server.jar nogui diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..1efe8b7 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,17 @@ +version: '2' + +services: + minecraft: + container_name: opsig_minecraft + build: . + + volumes: + - "./data:/minecraft/worlds" + - "/dev/null:/minecraft/server.jar" + - "/dev/null:/minecraft/eula.txt" + + + ports: + - "25565:25565" + + restart: always