Detailed tutorial on how to publish springboot projects through docker plug-in in IDEA

Detailed tutorial on how to publish springboot projects through docker plug-in in IDEA

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
ADD target/*.jar app.jar //Copy the files matching *.jar in the target folder in the same directory to app.jar and put them in the image

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:
  • The whole process of IDEA integrating docker to deploy springboot project
  • How to configure docker in IDEA2021.2 to image the springboot project and release it with one click
  • Detailed steps to deploy SpringBoot projects using Docker in Idea
  • Deploy the springboot project to docker based on idea
  • Detailed explanation of the process of deploying SpringBoot project through Docker plug-in in IDEA

<<:  Vue uses plug-ins to cut pictures in proportion

>>:  Causes and solutions for MySQL deadlock

Recommend

Summary of 4 methods of div+css layout to achieve 2-end alignment of css

The div+css layout to achieve 2-end alignment is ...

Analyze the difference between computed and watch in Vue

Table of contents 1. Introduction to computed 1.1...

Detailed explanation of the process of docker packaging Python environment

The steps of docker packaging Python environment ...

A brief analysis of the knowledge points of exporting and importing MySQL data

Often, we may need to export local database data ...

Talking about ContentType(s) from image/x-png

This also caused the inability to upload png files...

Sharing of web color contrast and harmony techniques

Color contrast and harmony In contrasting conditi...

Vue3.0 uses the vue-grid-layout plug-in to implement drag layout

Table of contents 1. Plugins 2. Interlude 3. Impl...

A simple tutorial on how to use the mysql log system

Table of contents Preface 1. Error log 2. Binary ...

Windows platform configuration 5.7 version + MySQL database service

Includes the process of initializing the root use...

DD DT DL tag usage examples

We usually use the <ul><li> tags, but ...

Detailed troubleshooting of docker.service startup errors

Execute the following command to report an error ...

How React Hooks Work

Table of contents 1. React Hooks vs. Pure Functio...

Node.js sends emails based on STMP protocol and EWS protocol

Table of contents 1 Node.js method of sending ema...

503 service unavailable error solution explanation

1. When you open the web page, 503 service unavai...