-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (28 loc) · 930 Bytes
/
Dockerfile
File metadata and controls
34 lines (28 loc) · 930 Bytes
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
FROM azul/zulu-openjdk-alpine:11-jre
COPY . /app
WORKDIR /app
# hack to avoid caching on conditional build checks
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
RUN echo "[Conditionally] starting the build JAR..." && \
sh /app/scripts/conditional_build.sh "/app/build/libs/monolith.jar" && \
echo "Copying the service JAR..." && \
cp /app/build/libs/monolith.jar /monolith.jar && \
echo "Creating the external IP2Location directory..." && \
mkdir /ip2location && \
echo "Copying the IP2Location file..." && \
mv /app/src/main/resources/ip2location/IP2Location.bin /ip2location/IP2Location.bin && \
echo "Removing unnecessary leftovers..." && \
rm -rf /app && \
rm -rf /root/.gradle && \
rm -rf /root/.kotlin && \
echo "Done."
WORKDIR /
EXPOSE 8080
ENTRYPOINT [ \
"java", \
"-XX:+UseSerialGC", \
"-XX:MaxRAM=265m", \
"-Xss256k", \
"-jar", \
"/monolith.jar" \
]