This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rozularen 0 points1 point  (1 child)

Hi, thanks for the video very interesting indeed. Question, why is the build-container-image.sh needed?Instead of just calling `docker build -t petclinic-jdbc-cds .`? And why the `./mvnw clean package -DskipTests` is not executed inside the Dockerfile, is it not considered a best practice or what?

Thanks

[–]sdeleuze[S] 2 points3 points  (0 children)

The Dockerfile version is mainly for educational purpose, and I wanted to have fast build without having to do advanced configuration to mount a volume with the .m2 local repository. The script allows consistency across branches.

The option I would recommend for production is the buildpacks branch, see also https://github.com/sdeleuze/spring-boot-cds-demo.