FINERACT-830: Configuring Dockerfile to use Google Distroless base image#887
FINERACT-830: Configuring Dockerfile to use Google Distroless base image#887vorburger merged 1 commit intoapache:developfrom
Conversation
|
Seems this works fine. @vorburger, @awasum is this OK for you? |
|
@ptuomola thanks for this!! I'll try to review this (and test it on https://www.fineract.dev...) ASAP. |
Dockerfile
Outdated
There was a problem hiding this comment.
This loss of the mysql-connector-java-8.0.19.jar is a problem for those who want to use that instead of Drizzle (e.g. I actually do, on https://www.fineract.dev...). It means e.g. that if you (quote) "comment out lines in the docker-compose.yml illustrate how to do this" it won't find it anymore after this PR.
@ptuomola do you think we could keep somehow that? Unfortunately, you can't just add it to dependencies.gradle - because we cannot distribute an LGPL library with Fineract release ZIPs that can be downloaded from https://fineract.apache.org. I know and totally agree that this is a bit of a mess; ask for references if you want more details. I guess you could still keep the wget here, and add it to the classpath when launching the JAR? BTW I'm sure you've also come across posts suggesting that a bit of startup time can be gained by "exploding" (uncompressing) "FAT JARs", and directly specifying the main class. I don't know if that's something you would be willing to already do here? Or we could of course look into that later. It just occurred to me that it may go naturally together with adding an additional JAR.
There was a problem hiding this comment.
@ptuomola due to FINERACT-980 I have just created FINERACT-982 for future discussion on this front, if you want to chime in there. But in the very short term, to get this PR in, IMHO we should still keep this as is? Unless you have any better ideas...
There was a problem hiding this comment.
To get MySQL driver option to work again, I've added in downloading the JAR for the driver back in. At the same time, I also exploded the JAR and changed Dockerfile to run the main class directly as suggested. Changes seem to work OK at least locally - tested with both Drizzle and MySQL connectors. Let me know if this looks ok...
There was a problem hiding this comment.
@ptuomola thanks! I'd love to manually test deploy this on https://www.fineract.dev before I merge it - I'll try to do that in the coming days, and assuming that it "just works" (which I expect that it will, just to be extra careful...), I'll merge it; hope that's OK.
There was a problem hiding this comment.
@xurror in the mean time, do you want to review this already, based on your comments I just saw in https://issues.apache.org/jira/browse/FINERACT-830 ? Please don't merge it yet, just review and LGTM - I'll merge it after I've tested it as described above - if it's LGTY.
|
@ptuomola I haven't forgotten about this (on the contrary), and am testing this right now... |
Using Google Distroless with OpenJDK 11 as base image for Fineract Docker build
FINERACT-830