0

Reading about Java applications with Docker, I noticed that some people use JDK images, such as Amazon Corretto, Eclpise Temurin, etc, and to build the project they use the Maven Wrapper (mvnw), while others use the actual Maven image, which has the "mvn" command available.

Are there any advantages or disadvantages of one approach over the other?

Wesley Alves
  • 63
  • 1
  • 6

1 Answers1

2

The Maven image is the official image to build with Maven. Why take something else and install Maven first (indirectly, though)?

I mean, you also not just start a plain linux image and install the JDK first.

Using the Maven image will be the fastest and most stable way of doing Maven.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142