-
Notifications
You must be signed in to change notification settings - Fork 98
/
Dockerfile
44 lines (33 loc) · 1.59 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM nimmis/java:oracle-8-jdk
MAINTAINER wendal "wendal1985@gmail.com"
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p "$CATALINA_HOME"
ENV TOMCAT_MAJOR 8
ENV TOMCAT_VERSION 8.0.24
ENV TOMCAT_TGZ_URL https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz
RUN cd $CATALINA_HOME \
&&wget -O tomcat.tar.gz $TOMCAT_TGZ_URL \
&& tar -xvf tomcat.tar.gz --strip-components=1 \
&& cd $CATALINA_HOME \
&& rm bin/*.bat \
&& rm tomcat.tar.gz* && rm -fr /usr/local/tomcat/webapps/ROOT \
&& rm -fr /usr/local/tomcat/webapps/docs /usr/local/tomcat/webapps/host-manager /usr/local/tomcat/webapps/manager /usr/local/tomcat/webapps/examples
ENV MAVEN_HOME /usr/share/maven
ENV MAVEN_TGZ_URL https://www.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
RUN mkdir /tmp2 && cd /tmp2 \
&& curl -sSL $MAVEN_TGZ_URL | tar xzf - -C /usr/share \
&& mv /usr/share/apache-maven-3.3.3 /usr/share/maven \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn \
&& curl -sSL https://github.com/Rekoe/Rk_Cms/archive/master.tar.gz | tar xzf - -C /tmp2 \
&& cd /tmp2 && ls -l && cd Rk_Cms-master \
&& mvn -f pom_docker.xml clean package \
&& mkdir -p /usr/local/tomcat/webapps/ROOT \
&& cp -r target/rk_cms/* /usr/local/tomcat/webapps/ROOT/ \
&& find /usr/local/tomcat/webapps/ROOT/ \
&& cd / \
&& rm -fr /tmp2 usr/share/maven /usr/bin/mvn ~/.m2
WORKDIR $CATALINA_HOME
EXPOSE 8080
RUN cd $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/ && sed -i 's/192.168.3.157/db/g' jdbc.properties
CMD ["catalina.sh", "run"]