docker for linux(5)
:
: docker commit
: docker build
5.dockerfileにおけるtomcat起動の問題を解決する
FROM centos
#
MAINTAINER [email protected]
# PATH
ENV PATH $CATALINA_HOME:$JAVA_HOME:$PATH
# JAVA_HOME
ENV JAVA_HOME /usr/local/jdk1.8/jdk1.8.0_11
# JAVA lib
ENV CLASSPATH .:$JAVA_HOME/lib
# TOMCAT_HOME
ENV CATALINA_HOME /usr/local/tomcat/apache-tomcat-8.5.37
# tomcat
RUN mkdir -p /usr/local/tomcat
# JDK
RUN mkdir -p /usr/local/jdk1.8
COPY jdk-8u11-linux-x64.tar.gz /usr/local
COPY apache-tomcat-8.5.37.tar.gz /usr/local
#
RUN tar -xf /usr/local/jdk-8u11-linux-x64.tar.gz -C /usr/local/jdk1.8 && rm -rf /usr/local/jdk-8u11-linux-x64.tar.gz
RUN tar -xf /usr/local/apache-tomcat-8.5.37.tar.gz -C /usr/local/tomcat && rm -rf /usr/local/apache-tomcat-8.5.37.tar.gz
WORKDIR $CATALINA_HOME
EXPOSE 8080
CMD /usr/local/tomcat/apache-tomcat-8.5.37/bin/catalina.sh run