forked from DragonetMC/DragonProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (23 loc) · 931 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
24
25
26
27
28
29
30
31
32
FROM maven:3.5.2-jdk-8-alpine
MAINTAINER https://github.com/DragonetMC
# create the group and user
RUN addgroup proxy && adduser -g "DragonProxy user" -s /bin/ash -D proxy -G proxy
# application placed into /opt/app
RUN mkdir -p /home/proxy/compile
WORKDIR /home/proxy/compile
# Copy project sources
COPY pom.xml /home/proxy/compile/pom.xml
COPY api /home/proxy/compile/api
COPY commons /home/proxy/compile/commons
COPY plugin /home/proxy/compile/plugin
COPY protocol /home/proxy/compile/protocol
COPY proxy /home/proxy/compile/proxy
COPY .git /home/proxy/compile/.git
# Build artifact
RUN mvn package -e
# Copy artifact
RUN cp /home/proxy/compile/proxy/target/dragonproxy-*-SNAPSHOT.jar /home/proxy/dragonproxy.jar
# Clean compile and maven cache
RUN rm -rf /home/proxy/compile
WORKDIR /home/proxy
CMD ["java", "-Dorg.dragonet.proxy.profile=container", "-jar", "/home/proxy/dragonproxy.jar"]