1. Configure Docker remote connection portLocate and edit the docker.service file on your server.
As shown in the figure below, add:
2. Restart Docker
3. Server open portsI use Alibaba Cloud Server and open ports in the configuration rules of the security group. 4. Test whether the remote connection is normal
5. Download the Docker plugin from IDEA6. Use the plugin to connect to the Docker container of the Alibaba Cloud serverAfter the connection is successful, you can see the image and container in Docker 7. Create a new Dockerfile file under the projectI put it in the project root directory, at the same level as pom.xml. #This is the base image FROM java:8 VOLUME /tmp #Copy the jar package to the image and change the name to app.jar ADD ./target/yun-tool-1.0.jar app.jar #Run the command when the container starts to start our project (this is actually a Linux command) ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] 8. Add a Docker configuration9. Use Maven to package the project into a jar package10. Run the build image11. Browser accesshttp://IP address:port This is the end of this article about deploying SpringBoot projects in IDEA through the Docker plug-in. For more information about deploying SpringBoot projects with Docker, 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:
|
<<: Detailed introduction to CSS priority knowledge
>>: Detailed explanation of transactions and indexes in MySQL database
Today, CSS preprocessors are the standard for web...
Table of contents 1: Introduction to galera-clust...
Data backup and restore part 3, details are as fo...
Pull the image # docker pull codercom/code-server...
Network security is a very important topic, and t...
Table of contents Preface Related Materials Vue p...
NProgress is the progress bar that appears at the...
Today is 618, and all major shopping malls are ho...
This article shares the MySQL backup script for y...
nginx traffic control Rate-limiting is a very use...
Table of contents 1. Interface definition 2. Attr...
1. Create the tomcat installation path mkdir /usr...
question Recently I needed to log in to a private...
Set Tomcat to automatically start the service: I ...
Table of contents Introduction The following is a...