Skip to content

Instantly share code, notes, and snippets.

@horimislime
Created September 16, 2013 13:14
Show Gist options
  • Save horimislime/6580541 to your computer and use it in GitHub Desktop.
Save horimislime/6580541 to your computer and use it in GitHub Desktop.
Java7+Tomcat7なアプリ実行環境を作る為のDockerfile
#
# VERSION 0.0.1
#
FROM ubuntu:12.10
MAINTAINER horimislime "horimislime@gmail.com"
# Setup
RUN apt-get install -y software-properties-common debconf-utils
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
# Java7
RUN echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 boolean true" | debconf-set-selections
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get install -y oracle-java7-installer
# Tomcat
RUN apt-get install -y tomcat7
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle/jre
RUN rm -r /var/lib/tomcat7/webapps/ROOT
ADD ./SNAPSHOT.war /var/lib/tomcat7/webapps/ROOT.war
EXPOSE 8080
CMD /etc/init.d/tomcat7 start && wait && tail -f /var/lib/tomcat7/logs/catalina.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment