-
Notifications
You must be signed in to change notification settings - Fork 7
/
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.7-eclipse-temurin-21-alpine@sha256:8b762a139e07e874e3830521d97bafaf963cce6bda92afe9fb532def5d011404 AS builder
WORKDIR /home/build
COPY . .
RUN ["mvn", "clean", "--no-transfer-progress", "package", "-DskipTests"]
FROM eclipse-temurin:21-jre-alpine@sha256:2a0bbb1db6d8db42c66ed00c43d954cf458066cc37be12b55144781da7864fdf 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"]