Perfecting my recipe for Java and Docker
I have a lot of docker builds that I do hadoop/ livy/hive. I have a few broad challenges I bounce between a developer and a user. At times I want something off the shelf with minor customization. Other times I want to patch and rebuild. The applications can be fairly sizable in terms of dependencies One of the biggest challenges I have run into is complications involving docker layers. The idea behind docker layers is that if you take a given docker file: RUN mkdir /abc RUN mkdir /def and place the frequently changed things closer to the bottom, then the upperlayers are reusable. This is true, but there are big challenges. In a large java project that you would role into an assembly jar a one line change to a single file in 1000 source files invalidates the entire JAR Building requires many packages that do not make it into the final product, the ~/.m2/repo, they periodically invalidate. My .m2 is 802 MB. Build processes frequently retouch files changing timestamps and scratch dir...