Skip to content

Instantly share code, notes, and snippets.

@jumperchen
Created December 15, 2015 06:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jumperchen/e907526d2531bd421e1b to your computer and use it in GitHub Desktop.
Save jumperchen/e907526d2531bd421e1b to your computer and use it in GitHub Desktop.
ZKSandbox's Dockerfile
FROM java:8-jdk
MAINTAINER Jumper Chen <jumperchen@potix.com>
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
# Config to get to install git, maven, and tomcat7
RUN apt-get update && apt-get install -y --force-yes git maven tomcat7
VOLUME /zksandbox
# copy your zksandbox (depends on where the Dockerfile located) folder
# into the container's folder /zksandbox
COPY zksandbox /zksandbox
WORKDIR /zksandbox
RUN mvn clean package
ENV CATALINA_HOME /usr/share/tomcat7
ENV PATH $PATH:$CATALINA_HOME/bin:$JAVA_HOME/bin
# Configure Tomcat 7 directories
RUN ln -s /var/lib/tomcat7/common $CATALINA_HOME/common && \
ln -s /var/lib/tomcat7/server $CATALINA_HOME/server && \
ln -s /var/lib/tomcat7/shared $CATALINA_HOME/shared && \
ln -s /etc/tomcat7 $CATALINA_HOME/conf && \
mkdir $CATALINA_HOME/temp && \
mkdir $CATALINA_HOME/webapps && \
ln -s /zksandbox/debug/zksandbox $CATALINA_HOME/webapps/zksandbox
CMD ["catalina.sh", "run"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment