Description
We are currently doing this in our tomcat container ((https://registry.hub.docker.com/u/readytalk/tomcat-native/dockerfile/), and I think it should actually be part of the official one :
ENV DEBIAN_FRONTEND noninteractive
ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/lib/x86_64-linux-gnu/
RUN apt-get update
RUN apt-get install -y libtcnative-1
More information on the tomcat native libraries here:
http://tomcat.apache.org/tomcat-8.0-doc/apr.html
From the docs:
Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).
These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.
I'd be happy to open a pull request if this is something people are interested in.