1. Write the Dockerfile (1) Right-click the project name, create a new text file, and change the name to Dockerfile without the suffix. Place it in the project root directory. (2) Fill in the Dockerfile content FROM openjdk:8 VOLUME /tmp ADD target/*.jar app.jar ENTRYPOINT ["java","-jar","/app.jar"] FROM openjdk:8 // indicates that the basic environment is jdk8 ENTRYPOINT ["java","-jar","/app.jar"] // Execute the jar command to run the project 2. Edit project configuration through docker plug-in (1) Find the configuration page Run -> Edit Configuration Click the + sign to add a new configuration and select Dockerfile for Docker (2) Edit configuration 3. Release the image and generate the container (1) Click the Servers tab <1> Shortcut key alt+8 (8 on the main keyboard) <2> Top menu -> View -> Tool Window -> Servers <3> Place the mouse on the icon in the lower left corner for a while (2) Publish via button Summarize This is the end of this article about the detailed tutorial on how to publish springboot projects in IDEA through the docker plug-in. For more information about how to publish springboot projects in IDEA, 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:
|
<<: Vue uses plug-ins to cut pictures in proportion
>>: Causes and solutions for MySQL deadlock
The div+css layout to achieve 2-end alignment is ...
Table of contents 1. Introduction to computed 1.1...
The steps of docker packaging Python environment ...
Often, we may need to export local database data ...
This also caused the inability to upload png files...
Color contrast and harmony In contrasting conditi...
Table of contents 1. Plugins 2. Interlude 3. Impl...
Table of contents Preface 1. Error log 2. Binary ...
Table of contents Preface 1. The request content ...
Includes the process of initializing the root use...
We usually use the <ul><li> tags, but ...
Execute the following command to report an error ...
Table of contents 1. React Hooks vs. Pure Functio...
Table of contents 1 Node.js method of sending ema...
1. When you open the web page, 503 service unavai...