The previous article has installed the docker service. Now let’s continue to introduce how to deploy a web project. 1: Create a directory dock at random and prepare the following files: 2. Write Dockerfile, which can quickly build docker images vi Dockerfile Add the following configuration FROM centos MAINTAINER this is dock image <jsh> ADD jdk1.8.0_191 /usr/local/java ENV JAVA_HOME /usr/local/java ENV JAVA_BIN /usr/local/java/bin ENV JRE_HOME /usr/local/java/jre ENV PATH $PATH:/usr/local/java/bin:/usr/local/java/jre/bin ENV CLASSPATH /usr/local/java/jre/bin:/usr/local/java/lib:/usr/local/java/jre/lib/charsets.jar ADD apache-tomcat-8.5.40 /usr/local/tomcat8 ENTRYPOINT ["/usr/local/tomcat8/bin/catalina.sh","run"] ADD ./manager.war /usr/local/tomcat8/webapps EXPOSE 8080 explain: 3. Build an Image Command: docker build -t dock . (space after dock.) to complete the build automatically. dock identifies the image name 4. Run the container Command: View all running container commands: 5. Test deployment results ip:8060 If the tomcat page appears, it means that the container has been started successfully. This is the end of this article about the implementation of Docker deployment of web projects. For more relevant content about Docker deployment of web projects, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed explanation of axios encapsulation and API interface management in React project
>>: What is the relationship between Mapper sql statement fields and entity class attribute names
Preface Before talking about covering index, we m...
1. In the previous chapter, we learned that we ca...
Connection query: It is the result of connecting ...
This article lists the most commonly used image c...
Preface If you use the overflow: scroll attribute...
Business requirements One of the projects I have ...
1. Introduction The previous program architecture...
1. What is a proxy server? Proxy server, when the...
Get the current date + time (date + time) functio...
1. First of all, we need to distinguish between t...
Data migration needs to be imported from MySQL to...
1. Background In actual projects, we will encount...
CSS3 can create animations, which can replace man...
Supervisor is a very good daemon management tool....
Written in front I don’t know who first discovere...