Skip to content

FINERACT-830: Configuring Dockerfile to use Google Distroless base image#887

Merged
vorburger merged 1 commit intoapache:developfrom
ptuomola:FINERACT-830
May 21, 2020
Merged

FINERACT-830: Configuring Dockerfile to use Google Distroless base image#887
vorburger merged 1 commit intoapache:developfrom
ptuomola:FINERACT-830

Conversation

@ptuomola
Copy link
Contributor

@ptuomola ptuomola commented May 14, 2020

Using Google Distroless with OpenJDK 11 as base image for Fineract Docker build

FINERACT-830

@xurror
Copy link
Contributor

xurror commented May 14, 2020

Seems this works fine. @vorburger, @awasum is this OK for you?

@vorburger vorburger self-requested a review May 15, 2020 17:13
@vorburger
Copy link
Member

@ptuomola thanks for this!! I'll try to review this (and test it on https://www.fineract.dev...) ASAP.

Dockerfile Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@vorburger
Copy link
Member

@ptuomola I haven't forgotten about this (on the contrary), and am testing this right now...

@vorburger vorburger merged commit 1bff035 into apache:develop May 21, 2020
@francisguchie francisguchie mentioned this pull request Mar 5, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants