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
1. Introduction When filtering unknown or partial...
I recently joined a new company and found some mi...
The target attribute of a link determines where th...
Table of contents 1. Initial SQL Preparation 2. M...
Table of contents Preface text 1. Concepts relate...
This article shares the specific code of js to re...
The previous article introduced the implementatio...
Install MySQL and keep a note. I don’t know if it...
Table of contents Preface 1. Why do cross-domain ...
Download opencv.zip Install the dependencies ahea...
MySQL installation instructions MySQL is a relati...
This article shares the specific code of Vue to a...
Table of contents Create a Vite project Creating ...
Introduction to CentOS CentOS is an enterprise-cl...
Result:Implementation code: <!DOCTYPE html>...