Last active
August 29, 2015 14:23
-
-
Save nunogt/ce74d02924b05be9857d to your computer and use it in GitHub Desktop.
Debian Jessie Apache Tomcat 7 Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:jessie | |
| MAINTAINER Nuno Taborda <@nunogt> | |
| # Update the system | |
| RUN apt-get update && apt-get -y upgrade | |
| # Install openjdk and tomcat | |
| RUN apt-get install -y openjdk-7-jre-headless tomcat7 libtcnative-1 | |
| # Patch init for start-stop-daemon not to require /proc scanning | |
| RUN sed -i s,--exec,--startas,g /etc/init.d/tomcat7 | |
| # Cleanup | |
| RUN apt-get clean -y | |
| RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
| # Export Java environment variables | |
| ENV JRE_HOME /usr/lib/jvm/java-7-openjdk-amd64 | |
| ENV JAVA_OPTS -Djava.awt.headless=true -server | |
| # Tell Docker we're exposing this port | |
| EXPOSE 8080 | |
| # Bootstrap Tomcat and never return | |
| CMD /etc/init.d/tomcat7 start && sleep infinity |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build as follows:
Then run:
Check host port mappings: