1.準備tomcat7
成都創(chuàng)新互聯(lián)專注于企業(yè)成都全網(wǎng)營銷、網(wǎng)站重做改版、于洪網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、H5高端網(wǎng)站建設(shè)、商城網(wǎng)站開發(fā)、集團公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站制作、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為于洪等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。
下載地址:https://tomcat.apache.org/download-70.cgi
下載文件名:tar.gz (pgp, sha512)
2.準備jdk8
下載地址:https://www.oracle.com/technetwork/cn/java/javase/downloads/jdk8-downloads-2133151-zhs.html
下載文件名:jdk-8u181-linux-i586.tar.gz
3.準備MySQLr的jar包
mysql-connector-java-5.1.35.jar
4.準備activiti-explorer的war包
下載地址:https://github.com/Activiti/Activiti/releases/download/activiti-5.22.0/activiti-5.22.0.zip
a.解壓activiti-5.22.0.zip,進入activiti/wars目錄,找到activiti-explorer\WEB-INF\classes下的db.properties配置文件并打開,修改下數(shù)據(jù)庫連接信息
db=activiti
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/activiti
jdbc.username=root
jdbc.password=123456
b.添加jar包
將mysql-connector-java-5.1.35.jar驅(qū)動包拷貝到activiti-explorer\WEB-INF\lib目錄下
c.清空tomcat的webapps中的所有
d.把activiti-explorer目錄復(fù)制到tomcat的webapp目錄下,將activiti-explorer重命名為ROOT
5.編寫Dockerfile文件
FROM centos
MAINTAINER dengyunshuo "dengyunshuo@163.com"
RUN mkdir -p /home/java/jdk8
ADD jdk8 /home/java/jdk8
RUN mkdir -p /home/java/tomcat7
ADD tomcat7 /home/java/tomcat7
ENV JAVA_HOME /home/java/jdk8
ENV CATALINA_HOME /home/java/tomcat7
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin
EXPOSE 8080
CMD ["/home/java/tomcat7/bin/catalina.sh","run"]
6.構(gòu)建鏡像
docker build -t activiti5:0.0.1 .
docker images
7.啟動容器
docker run -d -p 8081:8080 --name activiti5 activiti5:0.0.1
docker ps -a
8.訪問地址
地址:http://localhost:8081/
用戶名:kermit
密碼:kermit