Skip to content

Issue #7: Add Tomcat Native Libraries #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions 6-jre7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,18 @@ RUN set -x \
&& rm bin/*.bat \
&& rm tomcat.tar.gz*

RUN set -x \
&& apt-get update \
&& apt-get install -yq gcc make openssl libssl-dev libapr1 libapr1-dev openjdk-7-jdk="$JAVA_DEBIAN_VERSION" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you sort the list and put it in a variable so it is easier to purge later? It should make it more obvious that libapr1 is not a build dependency, but a run dependency. Redis has a pretty similar example: https://github.com/docker-library/redis/blob/98a586a0f5c505e120b22dc94efc1fa5c492ce35/3.0/Dockerfile#L24-L36. You should also drop openssl since it is already in the java base image since it has curl.

&& tar zxf /usr/local/tomcat/bin/tomcat-native.tar.gz -C /tmp \
&& cd /tmp/tomcat-native*-src/jni/native/ \
&& ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-7-openjdk-amd64/ --with-ssl=yes --libdir=/usr/lib/jni \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The java-home should be cleaner once the docker-library/openjdk#61 is pushed to the Docker Hub.

&& make \
&& make install \
&& apt-get purge -y openjdk-7-jdk="$JAVA_DEBIAN_VERSION" gcc make libssl-dev libapr1-dev \
&& apt-get -y autoremove \
&& rm -rf /tmp/tomcat-native* \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8080
CMD ["catalina.sh", "run"]
13 changes: 13 additions & 0 deletions 6-jre8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,18 @@ RUN set -x \
&& rm bin/*.bat \
&& rm tomcat.tar.gz*

RUN set -x \
&& apt-get update \
&& apt-get install -yq gcc make openssl libssl-dev libapr1 libapr1-dev openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
&& tar zxf /usr/local/tomcat/bin/tomcat-native.tar.gz -C /tmp \
&& cd /tmp/tomcat-native*-src/jni/native/ \
&& ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-8-openjdk-amd64/ --with-ssl=yes --libdir=/usr/lib/jni \
&& make \
&& make install \
&& apt-get purge -y openjdk-8-jdk="$JAVA_DEBIAN_VERSION" gcc make libssl-dev libapr1-dev \
&& apt-get -y autoremove \
&& rm -rf /tmp/tomcat-native* \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8080
CMD ["catalina.sh", "run"]
13 changes: 13 additions & 0 deletions 7-jre7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,18 @@ RUN set -x \
&& rm bin/*.bat \
&& rm tomcat.tar.gz*

RUN set -x \
&& apt-get update \
&& apt-get install -yq gcc make openssl libssl-dev libapr1 libapr1-dev openjdk-7-jdk="$JAVA_DEBIAN_VERSION" \
&& tar zxf /usr/local/tomcat/bin/tomcat-native.tar.gz -C /tmp \
&& cd /tmp/tomcat-native*-src/jni/native/ \
&& ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-7-openjdk-amd64/ --with-ssl=yes --libdir=/usr/lib/jni \
&& make \
&& make install \
&& apt-get purge -y openjdk-7-jdk="$JAVA_DEBIAN_VERSION" gcc make libssl-dev libapr1-dev \
&& apt-get -y autoremove \
&& rm -rf /tmp/tomcat-native* \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8080
CMD ["catalina.sh", "run"]
13 changes: 13 additions & 0 deletions 7-jre8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,18 @@ RUN set -x \
&& rm bin/*.bat \
&& rm tomcat.tar.gz*

RUN set -x \
&& apt-get update \
&& apt-get install -yq gcc make openssl libssl-dev libapr1 libapr1-dev openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
&& tar zxf /usr/local/tomcat/bin/tomcat-native.tar.gz -C /tmp \
&& cd /tmp/tomcat-native*-src/jni/native/ \
&& ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-8-openjdk-amd64/ --with-ssl=yes --libdir=/usr/lib/jni \
&& make \
&& make install \
&& apt-get purge -y openjdk-8-jdk="$JAVA_DEBIAN_VERSION" gcc make libssl-dev libapr1-dev \
&& apt-get -y autoremove \
&& rm -rf /tmp/tomcat-native* \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8080
CMD ["catalina.sh", "run"]
13 changes: 13 additions & 0 deletions 8-jre7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,18 @@ RUN set -x \
&& rm bin/*.bat \
&& rm tomcat.tar.gz*

RUN set -x \
&& apt-get update \
&& apt-get install -yq gcc make openssl libssl-dev libapr1 libapr1-dev openjdk-7-jdk="$JAVA_DEBIAN_VERSION" \
&& tar zxf /usr/local/tomcat/bin/tomcat-native.tar.gz -C /tmp \
&& cd /tmp/tomcat-native*-src/jni/native/ \
&& ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-7-openjdk-amd64/ --with-ssl=yes --libdir=/usr/lib/jni \
&& make \
&& make install \
&& apt-get purge -y openjdk-7-jdk="$JAVA_DEBIAN_VERSION" gcc make libssl-dev libapr1-dev \
&& apt-get -y autoremove \
&& rm -rf /tmp/tomcat-native* \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8080
CMD ["catalina.sh", "run"]
13 changes: 13 additions & 0 deletions 8-jre8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,18 @@ RUN set -x \
&& rm bin/*.bat \
&& rm tomcat.tar.gz*

RUN set -x \
&& apt-get update \
&& apt-get install -yq gcc make openssl libssl-dev libapr1 libapr1-dev openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
&& tar zxf /usr/local/tomcat/bin/tomcat-native.tar.gz -C /tmp \
&& cd /tmp/tomcat-native*-src/jni/native/ \
&& ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-8-openjdk-amd64/ --with-ssl=yes --libdir=/usr/lib/jni \
&& make \
&& make install \
&& apt-get purge -y openjdk-8-jdk="$JAVA_DEBIAN_VERSION" gcc make libssl-dev libapr1-dev \
&& apt-get -y autoremove \
&& rm -rf /tmp/tomcat-native* \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8080
CMD ["catalina.sh", "run"]