-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
34 lines (21 loc) · 891 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
33
34
FROM maven:3.9.7-eclipse-temurin-21-alpine@sha256:8b762a139e07e874e3830521d97bafaf963cce6bda92afe9fb532def5d011404 AS builder
WORKDIR /home/build
COPY . .
RUN ["mvn", "clean", "--no-transfer-progress", "package"]
FROM eclipse-temurin:21-jre-alpine@sha256:decee204b9a1eb333c364ba4d859a6b1380eb13f0980d2acfd65c09fee53a48a AS final
RUN ["apk", "--no-cache", "upgrade"]
RUN ["apk", "--no-cache", "add", "tini"]
ARG DNS_TTL=15
# Default to UTF-8 file.encoding
ENV LANG C.UTF-8
RUN echo networkaddress.cache.ttl=$DNS_TTL >> "$JAVA_HOME/conf/security/java.security"
ENV PORT 8080
ENV ADMIN_PORT 8081
ENV JAVA_OPTS -Xms1500m -Xmx1500m
EXPOSE 8080
EXPOSE 8081
WORKDIR /app
COPY --from=builder /home/build/target/*.yaml .
COPY --from=builder /home/build/target/pay-*-allinone.jar .
ENTRYPOINT ["tini", "-e", "143", "--"]
CMD exec java $JAVA_OPTS -jar ./pay-*-allinone.jar server ./*.yaml