forked from nicholasdille/docker-waterfall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (21 loc) · 874 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ARG JAVA_VERSION=11
FROM alpine AS waterfall
ARG WATERFALL_VERSION=latest
RUN apk add --update-cache --no-cache \
curl \
jq
RUN if test "${WATERFALL_VERSION}" = "latest"; then \
WATERFALL_VERSION=$(curl --silent --location https://papermc.io/api/v1/waterfall/ | jq --raw-output '.versions[0]'); \
fi && \
curl --silent --location --fail --output waterfall.jar https://papermc.io/api/v1/waterfall/${WATERFALL_VERSION}/latest/download
FROM openjdk:${JAVA_VERSION}-jre
RUN useradd --create-home --shell /bin/bash minecraft \
&& mkdir -p /opt/waterfall /var/opt/waterfall \
&& chown -R minecraft /var/opt/waterfall/
COPY --from=waterfall /waterfall.jar /opt/waterfall/
USER minecraft
WORKDIR /var/opt/waterfall
VOLUME /var/opt/waterfall
EXPOSE 25565
ENTRYPOINT [ "java" ]
CMD [ "-Xm512M", "-Xmx512M", "-jar", "/opt/waterfall/waterfall.jar" ]