Update docker container architecture to prevent data loss

This commit is contained in:
Tanguy Herbron 2021-07-18 17:16:13 +02:00
parent bb755a9c00
commit 410514a470
2 changed files with 5 additions and 16 deletions

View File

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

View File

@ -3,12 +3,11 @@ version: '3.7'
services: services:
mc_srv: mc_srv:
restart: unless-stopped restart: unless-stopped
build: image: openjdk:16-alpine
context: .
dockerfile: Dockerfile
ports: ports:
- 25565:25565 - 25566:25565
- 25575:25575
volumes: volumes:
- ${PWD}/world:/mc-server/world - ${PWD}:/mc-server
working_dir: "/mc-server"
entrypoint: ["sh", "/mc-server/scripts/start.sh"]