Skip to content

Instantly share code, notes, and snippets.

@slemeur
Last active August 29, 2015 14:09
Show Gist options
  • Save slemeur/5681f0774708e06bec0f to your computer and use it in GitHub Desktop.
Save slemeur/5681f0774708e06bec0f to your computer and use it in GitHub Desktop.
Tomcat-V8.0.14
#Reuse codenvy/jdk7 existing image
FROM codenvy/jdk7
#Get Tomcat-8.0.14 and install it
RUN mkdir /home/user/tomcat8 && \
wget -qO- "http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.14/bin/apache-tomcat-8.0.14.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>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment