r/learnjava • u/CodeyGrammar • Dec 11 '22
Why containerize a Java program using Docker?
I'm learning Docker and the idea of having a container for a Java app seems redundant to me since the idea of a JVM should make the Java code run on any environment?
But maybe I'm missing something and see if others containerize their Java apps using Docker and why.
46
Upvotes
2
u/loserIIITian Dec 12 '22
Hi, I use docker for development since we work in teams and we want to make sure everyone is on the same page regarding dependencies (versions mainly). Also we require container orchestration for deployment so we use docker and eks for our API (springboot rest api so an extension of java)