@@ -69,27 +69,36 @@ ARG TRUSTSTORE_TYPE
6969ARG TRUSTSTORE_PASS
7070ARG KEYSTORE_TYPE
7171ARG KEYSTORE_PASS
72+ ARG CERT_ALIAS
7273
7374ENV TRUSTSTORE_TYPE=$TRUSTSTORE_TYPE \
7475 TRUSTSTORE_PASS=$TRUSTSTORE_PASS \
7576 KEYSTORE_TYPE=$KEYSTORE_TYPE \
76- KEYSTORE_PASS=$KEYSTORE_PASS
77+ KEYSTORE_PASS=$KEYSTORE_PASS \
78+ CERT_ALIAS=$CERT_ALIAS
7779
7880# Enable SSL by adding the proper Connector to server.xml
7981RUN if [ "$SOLR_COMMS" == "https" ] ; then \
8082 sed -i "s/\
8183[[:space:]]\+ <\/ Engine>/\n \
8284 <\/ Engine>\n \
83- <Connector port=\" 8443\" protocol=\" HTTP\/ 1.1\"\n \
84- connectionTimeout=\" 20000\"\n \
85- SSLEnabled=\" true\" maxThreads=\" 150\" scheme=\" https\" clientAuth=\" want\" sslProtocol=\" TLS\" sslEnabledProtocols=\" TLSv1.2\"\n \
86- keystoreFile=\"\/ usr\/ local\/ tomcat\/ keystore\/ ssl.keystore\"\n \
87- keystorePass=\" ${KEYSTORE_PASS}\" keystoreType=\" ${KEYSTORE_TYPE}\" secure=\" true\"\n \
88- truststoreFile=\"\/ usr\/ local\/ tomcat\/ keystore\/ ssl.truststore\"\n \
89- truststorePass=\" ${TRUSTSTORE_PASS}\" truststoreType=\" ${TRUSTSTORE_TYPE}\" >\n \
85+ <Connector port=\" 8443\" protocol=\" org.apache.coyote.http11.Http11NioProtocol\"\n \
86+ connectionTimeout=\" 20000\" maxThreads=\" 150\"\n \
87+ SSLEnabled=\" true\" scheme=\" https\" secure=\" true\"\n \
88+ defaultSSLHostConfigName=\" localhost\" >\n \
89+ <SSLHostConfig hostName=\" localhost\" protocols=\" TLSv1.2\"\n \
90+ certificateVerification=\" required\"\n \
91+ truststoreFile=\"\/ usr\/ local\/ tomcat\/ keystore\/ ssl.truststore\"\n \
92+ truststorePassword=\" ${TRUSTSTORE_PASS}\" truststoreType=\" ${TRUSTSTORE_TYPE}\" >\n \
93+ <Certificate certificateKeystoreFile=\"\/ usr\/ local\/ tomcat\/ keystore\/ ssl.keystore\"\n \
94+ certificateKeyAlias=\" ${CERT_ALIAS}\" type=\" RSA\"\n \
95+ certificateKeystorePassword=\" ${KEYSTORE_PASS}\" certificateKeystoreType=\" ${KEYSTORE_TYPE}\"\/ >\n \
96+ <\/ SSLHostConfig>\n \
9097 <\/ Connector>/g" ${TOMCAT_DIR}/conf/server.xml; \
9198 fi
9299
100+
101+
93102<% if (ftp == 'true' ) { %>
94103EXPOSE 2121 2433 2434
95104<% } %>
0 commit comments