3.3.war包应用构建
准备工作,1.数据库准备,程序源码
1
| https://192.168.0.29:8443/svn/200103/trunk/05.Code/cok/cok-war
|
1.准备cok-war包,编写镜像文件Dockerfile:
1 2 3
| from tomcat:8.5.55-jdk8 RUN rm -fr /usr/local/tomcat/webapps/ROOT COPY target/cok-war /usr/local/tomcat/webapps/ROOT
|
2.构建镜像文件Dockerfile:
1
| docker build -t hub.aosccs.com.cn:8888/test1/cok-war:v1.0 .
|
3.启动容器:
1
| docker run -itd --name cok-war -v /root/luojunjie/docker/war/cok-war/jdbc.properties:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/prop/jdbc.properties -p 18080:8080 hub.aosccs.com.cn:8888/test1/cok-war:v1.0
|
4.访问:
http://192.168.3.6:18080/test/index
