This is how you can dockerize a Spring-Boot Application (step-by-step)

preview_player
Показать описание
In this video you're going to see the process of dockerizing a Spring-Boot application (and a plain Java app), which involves packaging your application into a JAR file, followed by the creation of a Docker image that contains the JAR file and runs it when the container starts.

We're going to start by dockerizing a Spring-Boot application, and then we're going to see how you can do the same thing from scratch, with a plain Java app that doesn't have any framework installed.

I really hope you find this video useful and don't hesitate to ask any questions in the comments section below!

Enjoy!
Рекомендации по теме
Комментарии
Автор

You are a legend. Please also talk about prerequisities required like the jdk version, gradle version, docker commands and so on. When I tried your examples because all tools change over time things go wrong unless you come up with good related versions of all tools like jdk and gradle and so on.

mortezalotfi
Автор

Spring boot gradle build has a task which does this out of the box.

ЗахариПалазов
Автор

One docker -t failed not because of a transient error but because you said openDJK in docker file instead of openJDK

mortezalotfi
Автор

./gradlew bootbuildimage
Generte docter image

dimohamdy