Docker Dockerfile A description of the new mirror on the existing Tomcat image _docker

Source: Internet
Author: User
Tags tomcat

If you need to replace or add a file to the old Tomcatimage to form a new image, you need to do something in Dockerfile

From Old_tomcat
#这里可以使用docker官方的镜像, the following descriptions are examples of
maintainer ****************** on this basis
#如果需要替换原有的配置文件或者脚本 
ADD web.xml/usr/local/tomcat/webapps/manager/web-inf/ 
Add tomcat-users.xml/usr/local/tomcat/conf/ 
Add server.xml/usr/local/tomcat/conf/ 
add catalina.sh/usr/ local/tomcat/bin/ 
ADD needs to hit the war package name in image. war/usr/local/tomcat/webapps/
expose 8080 
CMD ["/usr/local/ Tomcat/bin/catalina.sh "," Run "]

And then

Docker build-t New_tomcat.

A new modified mirror is formed, and when you start a container for the new mirror, the war is already in the early container, and you do not need to map the host host directory to/usr/local/tomcat/webapps/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.