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
Table of contents Variable Scope The concept of c...
View the IP address of the Container docker inspe...
To see the effect directly, a right-click menu ha...
Disclaimer: Since the project requires the use of...
1. The role of doctype, the difference between st...
I encountered a problem today: Can I use the as a...
1. Division of labor and process <br />At T...
The installation of MySQL 8.0.12 took two days an...
Networks usage tutorial Official website docker-c...
This article shares the specific code of jQuery t...
MySQL is the most popular relational database man...
Step 1: Add a secondary domain name to the Alibab...
Table of contents 1. Introduction to Nginx 1. Wha...
Dynamically implement a simple secondary menu Whe...
When the above settings are used in IE8 and Chrome...