News for hackers. Stuff that matters.
Re:Improved Docker Container Integration with Java 10 by joeskyyy on Wednesday April 04, 2018 @12:26PM (#16756268)
A container is not a VM (at least in the traditional sense). The advantages of running java inside of a container is that you can ship all of your things as one artifact, and run it on a bunch of different infrastructures, with all it's dependencies packaged together. So rather than needing to use something to ensure your properties are configured correctly, and all your passwords are where they need to be, and all your other bits and such are in place, you can pack it all in a container and run it anywhere (Well... "anywhere" being a bit of a stretch, but you get the idea haha)
Re:Improved Docker Container Integration with Java 10 by w8rbt on Wednesday April 04, 2018 @01:01PM (#16756648)
I think the OP's point is, that's what a jar file was supposed to do. You can ship a bundled-up jar file to anyone and they can run it so long as they have the right JVM installed. Now, you replace 'the right JVM install' with, 'the right Docker install' and what have we really gained? It seems an added layer of complexity for little gain.

I like docker and use it, but it's not for everything everywhere and is overly-hyped IMO.

Re:Improved Docker Container Integration with Java 10 by danudey on Wednesday April 04, 2018 @01:14PM (#16756799)
> they can run it so long as they have the right JVM installed

This is the key. The right JVM, the right classpaths, the right configuration, the right permissions, the right native libraries.

The setup process for every Java app we've used (thankfully just ActiveMQ and Kafka lately) have been incredibly complicated. JAR files in paths, long, convoluted shell scripts to set up all possible variables for every possible JVM, wrappers that wrap launchers, etc.

And then all of those steps are prone to breakage and are difficult to debug.

Shipping a Docker container lets you say "Here is a working environment that needs no configuration and won't suddenly fail until reconfigured when another app you have needs Java 9 and not Java 8".

Re:Improved Docker Container Integration with Java 10 by javier2 on Wednesday April 04, 2018 @02:06PM (#16757308)
This. Going from java 5 to java 5+n with everything have to use the same JVM, shared on a computer was a nightmare in my large organization.
Re:Improved Docker Container Integration with Java 10 by michaelcampbell on Wednesday April 04, 2018 @06:31PM (#16759891)
Yes, when I tell people to start looking at Docker as an "complete application packaging" solution (vs a VM), the light seems to go on for most.
Re:Improved Docker Container Integration with Java 10 by lostmsu on Thursday April 05, 2018 @02:04PM (#16767329)
Wait until you get to Docker 5 -> Docker 6. I bet it will turn into Java basically.
Re:Improved Docker Container Integration with Java 10 by ivan_gammel on Wednesday April 04, 2018 @04:27PM (#16758693)
"Right Docker install" - I agree, there will be that problem at some point. But containers are not just some extra layer: they do not solve the same problem as fat jar. JARs are used for the distribution of the code and related assets. With containers you can distribute and isolate the deployment configuration: you can run multiple applications on the same physical server and not worry about conflicts due to different versions of JRE or system libraries. Vulnerability in one app will not affect another one. Security patches and system updates may be tested in isolation in a single container, before propagating the change (in the form of a common base image) to others. And, of course, it's just very convenient to run the whole Linux-based production cluster or test load balancing on your work laptop with Windows. :)
Re:Improved Docker Container Integration with Java 10 by delecti on Wednesday April 04, 2018 @12:37PM (#16756384)
So Java, which was supposed to be "write once, run anywhere", didn't meet that goal enough, so Docker wraps it in something that "actually for real" is supposed to be "write once, run anywhere", but even then doesn't quite meet that goal?
Re:Improved Docker Container Integration with Java 10 by crazysmoove on Wednesday April 04, 2018 @12:53PM (#16756548)
No. Java's "write once, run anywhere" promise is that you would not have to re-compile your source code to target different architectures like you do with C or C++. Docker's promise is that you don't have to rely on external things like databases, filesystem details, and other things _outside your program_ being in place across environments. Same idea, different levels of abstraction.
Re:Improved Docker Container Integration with Java 10 by ivan_gammel on Wednesday April 04, 2018 @12:44PM (#16756481)
Java is perfectly capable of running everywhere, so containers are used not to solve this problem. With a container you ship the fixed version of the execution environment: JRE, system libraries, startup scripts, etc.
Re:Improved Docker Container Integration with Java 10 by inamberclad on Wednesday April 04, 2018 @12:43PM (#16756454)
And so, the cycle continues