Skip to content

Commit fc10d7f

Browse files
authored
Merge pull request #7 from Dwolla/cleanup-dockerfile
check if file exists, do not rely on TEMURIN_TAG
2 parents 4cb6f14 + 8889dc8 commit fc10d7f

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ ARG TEMURIN_TAG
22

33
FROM eclipse-temurin:$TEMURIN_TAG
44

5-
ARG TEMURIN_TAG
65
MAINTAINER Dwolla Engineering <dev+docker@dwolla.com>
76
LABEL org.label-schema.vcs-url="https://github.com/Dwolla/docker-java"
87

9-
RUN if [ "$TEMURIN_TAG" = "8u322-b06-jdk" ] ; then \
10-
SECURITY_FILE_PATH=$JAVA_HOME/jre/lib/security/java.security ; \
11-
elif [ "$TEMURIN_TAG" = "8u322-b06-jre" ] ; then \
12-
SECURITY_FILE_PATH=$JAVA_HOME/lib/security/java.security ; \
8+
RUN if [ -f "$JAVA_HOME/jre/lib/security/java.security" ] ; then \
9+
SECURITY_FILE_PATH=$JAVA_HOME/jre/lib/security/java.security ; \
10+
elif [ -f "$JAVA_HOME/lib/security/java.security" ] ; then \
11+
SECURITY_FILE_PATH=$JAVA_HOME/lib/security/java.security ; \
12+
elif [ -f "$JAVA_HOME/conf/security/java.security" ] ; then \
13+
SECURITY_FILE_PATH=$JAVA_HOME/conf/security/java.security ; \
1314
else \
14-
SECURITY_FILE_PATH=$JAVA_HOME/conf/security/java.security; \
15+
echo 'java.security file path not found' ; \
16+
exit 98 ; \
1517
fi && \
1618
apt-get update && \
1719
apt-get install -y bash && \

0 commit comments

Comments
 (0)