Skip to content

Instantly share code, notes, and snippets.

@sunix
Last active August 29, 2015 14:13
Show Gist options
  • Save sunix/f97662056c576158e5f8 to your computer and use it in GitHub Desktop.
Save sunix/f97662056c576158e5f8 to your computer and use it in GitHub Desktop.
Dockerfile for codenvy with tomcat 8.0.15
#Reuse codenvy/jdk7 existing image
FROM codenvy/jdk7
#Get Tomcat-8.0.14 and install it
RUN mkdir /home/user/tomcat8 && \
wget -qO- "http://mirrors.ircam.fr/pub/apache/tomcat/tomcat-8/v8.0.18/bin/apache-tomcat-8.0.18.tar.gz" | tar -zx --strip-components=1 -C /home/user/tomcat8 && \
rm -rf /home/user/tomcat8/webapps/*
#Exposing ports
EXPOSE 8080
ENV CODENVY_APP_PORT_8080_HTTP 8080
#Changing to another working directory
WORKDIR /home/user/tomcat8/bin
#Deploying the built application on Tomcat
ADD $app$ /home/user/tomcat8/webapps/ROOT.war
# Set JVM options (low memory)
ENV JAVA_OPTS -Djava.awt.headless=true -server -Xms48m -Xmx200M -XX:MaxPermSize=200m
#Start and run Tomcat 8
CMD ./catalina.sh run 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment