Skip to content

Commit 8c34736

Browse files
committed
[Fix] Include default truststore path when passing JAVA_TOOL_OPTIONS for Java 17 image (awslabs#3007)
1 parent a3fd11d commit 8c34736

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ ARG JAVA_VERSION=11
33
# Use the specified version of Java
44
FROM public.ecr.aws/lambda/java:${JAVA_VERSION}
55

6-
# Argument for Java tool options for ssl
7-
ARG JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStore=/var/lang/lib/security/cacerts"
8-
# Set the JAVA_TOOL_OPTIONS environment variable for Java 17
9-
ENV JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
6+
# Argument for Java tool options
7+
ARG JAVA_TOOL_OPTIONS=""
8+
# Set the JAVA_TOOL_OPTIONS environment variable for Java 17 and always include default truststore to avoid SSL handshake issues
9+
ENV JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStore=/var/lang/lib/security/cacerts ${JAVA_TOOL_OPTIONS}"
1010

1111
# Install necessary tools
1212
RUN yum update -y

athena-docdb/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ ARG JAVA_VERSION=11
33
# Use the specified version of Java
44
FROM public.ecr.aws/lambda/java:${JAVA_VERSION}
55

6-
# Argument for Java tool options for ssl
7-
ARG JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStore=/var/lang/lib/security/cacerts"
8-
# Set the JAVA_TOOL_OPTIONS environment variable for Java 17 and for ssl
9-
ENV JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
6+
# Argument for Java tool options
7+
ARG JAVA_TOOL_OPTIONS=""
8+
# Set the JAVA_TOOL_OPTIONS environment variable for Java 17 and always include default truststore to avoid SSL handshake issues
9+
ENV JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStore=/var/lang/lib/security/cacerts ${JAVA_TOOL_OPTIONS}"
1010

1111
# Install necessary tools
1212
RUN yum update -y

athena-oracle/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ ARG JAVA_VERSION=11
33
# Use the specified version of Java
44
FROM public.ecr.aws/lambda/java:${JAVA_VERSION}
55

6-
# Argument for Java tool options for ssl
7-
ARG JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStore=/var/lang/lib/security/cacerts"
8-
# Set the JAVA_TOOL_OPTIONS environment variable for Java 17 and for ssl
9-
ENV JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
6+
# Argument for Java tool options
7+
ARG JAVA_TOOL_OPTIONS=""
8+
# Set the JAVA_TOOL_OPTIONS environment variable for Java 17 and always include default truststore to avoid SSL handshake issues
9+
ENV JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStore=/var/lang/lib/security/cacerts ${JAVA_TOOL_OPTIONS}"
1010

1111
# Install necessary tools
1212
RUN yum update -y

0 commit comments

Comments
 (0)