forked from PowerNukkitX/PowerNukkitX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-graalvm
33 lines (25 loc) · 918 Bytes
/
Dockerfile-graalvm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM alpine:3.16.3 AS prepare
# Copy the libs and nukkit.yml
WORKDIR /work
COPY /target/libs /work/libs
COPY src/main/resources/default-nukkit.yml /work/nukkit.yml
COPY entrypoint.sh /work/entrypoint.sh
RUN apk add --no-cache wget && \
apk add --no-cache unzip && \
wget https://github.com/PowerNukkitX/PNX-CLI/releases/download/0.1.6/PNX-CLI-0.1.6.jar
# Final image
FROM findepi/graalvm:java17
LABEL author="CoolLoong"
WORKDIR /pnx
ENV language=eng
ENV memory=2G
COPY --from=prepare /work/libs /pnx/libs
COPY --from=prepare /work/PNX-CLI-0.1.6.jar /pnx/cli.jar
COPY --from=prepare /work/nukkit.yml /pnx/nukkit.yml
COPY --from=prepare /work/entrypoint.sh /pnx/entrypoint.sh
RUN gu install js && \
mkdir -p /pnx/plugins /pnx/players /pnx/worlds && \
java -jar /pnx/cli.jar server -u --latest
EXPOSE 19132/udp
VOLUME ["/pnx/plugins","/pnx/players","/pnx/worlds"]
ENTRYPOINT ["/pnx/entrypoint.sh"]