forked from PowerNukkit/PowerNukkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pterodactyl-image-java8.Dockerfile
44 lines (31 loc) · 1.09 KB
/
pterodactyl-image-java8.Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
#
# Get the pterodacty egg from https://github.com/PowerNukkit/PowerNukkit-Pterodactyl-Egg!
#
# Prepare the source
FROM alpine/git:v2.26.2 AS prepare
# Copy the source
WORKDIR /src
COPY pom.xml /src
COPY src/main/java /src/src/main/java
COPY src/main/resources /src/src/main/resources
COPY src/test/java/cn /src/src/test/java/cn
COPY src/test/resources /src/src/test/resources
COPY .git /src/.git
# Update the language submodule
RUN if [ -z "$(ls -A /src/src/main/resources/lang)" ]; then git submodule update --init; fi
# Prepare to build the source
FROM maven:3.6-jdk-8-alpine as build
# Copy the source
WORKDIR /src
COPY --from=prepare /src /src
# Build the source
RUN mvn -Dmaven.javadoc.skip=true --no-transfer-progress clean package
# Final image
FROM quay.io/pterodactyl/core:java as pterodactyl
LABEL author="José Roberto de Araújo Júnior" maintainer="[email protected]"
USER root
ENV USER=root HOME=/root
RUN mkdir -p /opt/PowerNukkit
COPY --from=build /src/target/powernukkit-*-shaded.jar /opt/PowerNukkit/PowerNukkit.jar
USER container
ENV USER=container HOME=/home/container