FROM centos:latest
# 修改成东八区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
RUN mkdir -m 777 -p /usr/java/jdk1.6.0_45
ADD jdk1.6.0_45 /usr/java/jdk1.6.0_45
RUN mkdir -m 777 -p /usr/local/tomcat
ADD tomcat /usr/local/tomcat
#RUN ["chmod", "777", "/usr/local/tomcat/bin/catalina.sh"]
RUN yum install -y libnsl
#添加环境变量
ENV JAVA_HOME /usr/java/jdk1.6.0_45
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin
EXPOSE 8080
CMD ["/usr/local/tomcat/bin/catalina.sh","run"]