forked from alphagov/pay-adminusers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (20 loc) · 1019 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 adoptopenjdk/openjdk11:jre-11.0.9_11.1-alpine@sha256:18a90fe4c1b4140ce960294edb05c9ab5113fd4868a2c06b885c33db3bf99ab3
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"
# Add RDS CA certificates to the default truststore
RUN wget -qO - https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem | keytool -importcert -noprompt -cacerts -storepass changeit -alias rds-ca-2019-root \
&& wget -qO - https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem | keytool -importcert -noprompt -cacerts -storepass changeit -alias rds-combined-ca-bundle
RUN ["apk", "add", "--no-cache", "bash", "tini"]
ENV PORT 8080
ENV ADMIN_PORT 8081
EXPOSE 8080
EXPOSE 8081
WORKDIR /app
COPY docker-startup.sh /app/docker-startup.sh
COPY target/*.yaml /app/
COPY target/pay-*-allinone.jar /app/
ENTRYPOINT ["tini", "-e", "143", "--"]
CMD ["bash", "./docker-startup.sh"]