FROM alpine:3.19

WORKDIR /server

COPY server/ ./server/

RUN apk add --no-cache openjdk17-jre vim

VOLUME ["/server/world"]

ENV JAVA_MIN_MEM=1G
ENV JAVA_MAX_MEM=1G

EXPOSE 25565

ENTRYPOINT ["/server/entrypoint.sh"]