wrote docker files during ops ig

This commit is contained in:
Michael 2023-02-14 01:37:11 +00:00
commit 8c467adef8
2 changed files with 29 additions and 0 deletions

12
Dockerfile Normal file
View File

@ -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

17
docker-compose.yaml Normal file
View File

@ -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