It's simple, just go to the tutorial, blogger 1. First start docker
2. Pull the tomcat image.
If you don't add the 8-jdk8 tag, the latest version will be pulled by default, which is the latest official version. 3. After the installation is complete, create a container and start tomcat
If a 404 error occurs when accessing the IP+port after normal installation, enter the tomcat directory, delete the original webapps directory, and rename webapps.dist to webapps. The command is as follows
4. Check the container operation status
5. Then package the springboot project, taking the war package as an example <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> First exclude the tomcat that comes with springboot <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> Then add the Maven packaging component 6. Package in IDEA, then check the target folder of the project, find the corresponding war package, and copy it to the corresponding directory in Linux 7. Copy the war package into the webapps directory of the tomcat container and check whether it is copied correctly
8. Restart tomcat and access ip+port+project name again
Done! This is the end of this article about how to install tomcat with docker and deploy the Springboot project war package. For more information about how to install tomcat with docker and deploy the Springboot project war package, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: About the problem of dynamic splicing src image address of img in Vue
>>: XHTML tags have a closing tag
Beginners can learn HTML by understanding some HT...
<br />The page uses UTF8 encoding, and the h...
This article shares the specific code of JavaScri...
The following is my judgment based on the data st...
Table of contents About MariaDB database in Linux...
Table of contents summary Environment and tool pr...
Table of contents 1. Overview 2. Name field 3. Ve...
Preface Everyone knows how to run a jar package o...
This article introduces the CSS Sticky Footer imp...
Whether it is Samba service or NFS service, the m...
Table of contents Understanding Prototypes Unders...
1. Custom text selection ::selection { background...
Use HSSFWorkbook in Apache.POI to export to Excel...
Table of contents 1 Conceptual distinction 2 Case...
The telnet in the Alpine image has been moved to ...