I'm new to using java and have just started getting a grasp of the build process and dependency management system of Maven and Gradle.
From what I understand, Docker is a great tool for deploying containers inside of a docker host. I imagine this is useful in the same way Vagrant is (although not functionally the same) in that it removes the issue of the environment not being what was expected.
It was my understanding that when building things with Maven or Gradle that you could create a JAR file or a WAR file that included the binaries inside them so it could run wherever the JVM was. With Docker, this seems redundant. I imagine that Docker is could be used for other things like programs running from C++ or anything else? Is Docker redundant for Java usage?
Docker is about isolation and reproducibility.
The last point allows to specify an execution environment, with the exact brand of JDK/JVM that you need, for you to run on a dev machine (with a VM) or in production.
Years laters, even if you can no longer download the precise update revision of the JDK you used when you initially deployed that project, you will still be able to reproduce that execution environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With