Snippet of my Dockerfile
:
FROM amazoncorretto:8
RUN yum update -y && yum install -y apr-devel && yum install -y openssl-devel && yum install -y gcc && yum install -y make && yum install -y tar && yum install -y gzip
RUN curl "http://apache.spinellicreations.com/tomcat/tomcat-connectors/native/1.2.23/source/tomcat-native-1.2.23-src.tar.gz" -o ./tomcat-native-1.2.23-src.tar.gz
RUN tar zxf ./tomcat-native-1.2.23-src.tar.gz -C .
RUN cd tomcat-native-1.2.23-src/native/
RUN ./tomcat-native-1.2.23-src/native/configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-1.8.0-amazon-corretto/
RUN make && make install
RUN cp -r /usr/local/apr/lib/* /usr/lib/
.... MORE
The above commands added in Dockerfile
worked for me. Thanks to following resources which helped me find out the commands to add to Dockerfile
:
How to install Apache Tomcat Native library
Find out where JAVA is
Tomcat Native / OpenSSL in Spring Boot 2.0
I have not run tests to compare the results to see if any improvements yet.