-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (25 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
28 lines (25 loc) · 1.16 KB
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
ARG TEMURIN_TAG
FROM eclipse-temurin:$TEMURIN_TAG
LABEL maintainer="Dwolla Engineering <dev+docker@dwolla.com>"
LABEL org.label-schema.vcs-url="https://github.com/Dwolla/docker-java"
RUN set -e; \
if [ -f "$JAVA_HOME/jre/lib/security/java.security" ] ; then \
SECURITY_FILE_PATH=$JAVA_HOME/jre/lib/security/java.security ; \
elif [ -f "$JAVA_HOME/lib/security/java.security" ] ; then \
SECURITY_FILE_PATH=$JAVA_HOME/lib/security/java.security ; \
elif [ -f "$JAVA_HOME/conf/security/java.security" ] ; then \
SECURITY_FILE_PATH=$JAVA_HOME/conf/security/java.security ; \
else \
echo 'java.security file path not found' ; \
exit 98 ; \
fi && \
apt-get update && \
apt-get install -y \
bash \
netcat-traditional \
&& \
sed -i s_#networkaddress.cache.ttl=-1_networkaddress.cache.ttl=60_ $SECURITY_FILE_PATH && \
sed -i s_securerandom.source=file:/dev/random_securerandom.source=file:/dev/./urandom_ $SECURITY_FILE_PATH && \
apt-get clean && \
grep ^networkaddress\\\.cache\\\.ttl=60$ $SECURITY_FILE_PATH && \
grep ^securerandom\\\.source=file:/dev/\\\./urandom$ $SECURITY_FILE_PATH \