IntelliJ Idea: Creating and Running Java Applications in Docker Containers

In my project, I would like container applications to load Spring not only in the production environment, but also locally. For this, I would like to:

  • Run docker container (from java image)
  • Click Run in IntelliJ Idea
  • Build the application in the container (not using my local computer compiler, but the one that is in the container)
  • Run the application in the container

Is such a scenario possible? I do not want to use Gradle or Maven to create an application in a container. I want to tell IntelliJ Idea to use the jQuery compiler of the container inside docker, and not the one I have locally.

+5
source share
1 answer

What may be useful is described here . Basically you need devtools and run the spring-boot application inside the docker container - cannot be done via java -jar ... - rather with maven or gradle plugins. Then configure your java application with the RemoteSpringApplication class and it should work.

Unfortunately, I am having some problems, see this question.

+1
source

Source: https://habr.com/ru/post/1247114/


All Articles