FROM openjdk:17-slim

ENV MC_VERSION="latest" \
    PAPER_BUILD="latest" \
    MC_RAM="4G" \
    JAVA_OPTS=""

ADD papermc.sh .
RUN apt-get update \
    && apt-get install -y wget \
    && apt-get install -y jq \
    && mkdir /papermc

CMD ["sh", "./papermc.sh"]

EXPOSE 25565
VOLUME /papermc
