From 410514a47038c7201037d3bb81e1a5eff1436394 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sun, 18 Jul 2021 17:16:13 +0200 Subject: [PATCH] Update docker container architecture to prevent data loss --- Dockerfile | 10 ---------- docker-compose.yml | 11 +++++------ 2 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3ca7492..0000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM openjdk:8u212-jre-alpine - -EXPOSE 25565 -EXPOSE 25575 - -WORKDIR /mc-server - -COPY . /mc-server -RUN chmod +x /mc-server/scripts/start.sh -CMD ["/bin/sh", "-c", "./scripts/start.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index 1666509..79c0776 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,11 @@ version: '3.7' services: mc_srv: restart: unless-stopped - build: - context: . - dockerfile: Dockerfile + image: openjdk:16-alpine ports: - - 25565:25565 - - 25575:25575 + - 25566:25565 volumes: - - ${PWD}/world:/mc-server/world + - ${PWD}:/mc-server + working_dir: "/mc-server" + entrypoint: ["sh", "/mc-server/scripts/start.sh"]