/
Dockerfile
38 lines (23 loc) · 1017 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
35
36
37
38
FROM maven:3.9.5-eclipse-temurin-17-alpine@sha256:5f0dc07092c3806ff7cf7c3f21b0e93d30befc5d56adf03758d301c05d63efb8 AS builder
WORKDIR /home/build
COPY . .
RUN ["mvn", "clean", "--no-transfer-progress", "package", "-DskipTests"]
FROM eclipse-temurin:17-jre-alpine@sha256:ad9223070abcf5716e98296a98c371368810deb36197b75f3a7b74815185c5e3 AS final
RUN ["apk", "--no-cache", "upgrade"]
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"
COPY ./import_aws_rds_cert_bundles.sh /
RUN /import_aws_rds_cert_bundles.sh && rm /import_aws_rds_cert_bundles.sh
RUN ["apk", "add", "--no-cache", "bash", "tini"]
ENV PORT 8080
ENV ADMIN_PORT 8081
EXPOSE 8080
EXPOSE 8081
WORKDIR /app
COPY --from=builder /home/build/docker-startup.sh .
COPY --from=builder /home/build/target/*.yaml .
COPY --from=builder /home/build/target/pay-*-allinone.jar .
ENTRYPOINT ["tini", "-e", "143", "--"]
CMD ["bash", "./docker-startup.sh"]