FusionAuth/fusionauth-containers

Published images include wrong JDK

kevcube opened this issue · 4 comments

Screen Shot 2022-02-04 at 4 21 21 PM

(From image fusionauth/fusionauth-app:1.32.1 linux/arm64)

When I build from these Dockerfiles, I get an image that properly contains the arm64 JDK/JRE, but when I pull from Dockerhub I get an arm64 image with an x86-64 JDK that fails to start. Not sure where the inconsistency was introduced, but just wanting to draw attention to it. Image tag latest for platform linux/arm64 is currently broken.

Thanks @kevcube will take a look.

I thinkI understand the problem.

One issue is that dpkg --print-architecture is not a reliable way to identify arch in multi-arch builds using buildx. This will show the arch of the build platform but not the target.

Lots good info here on how to identify arch and the issues with various ways of identifying target arch during a build.
https://github.com/BretFisher/multi-platform-docker-build

The other problem is that to use jlink in a cross platform way, you have to run jlink on the build platform but against the target platform binaries.
https://stackoverflow.com/a/47594270

Should have it fixed up shortly.

Got it all working, updating images now. The 1.32.1and latest tags has been updated if you want to confirm.

Thanks a lot @kevcube for letting us know and for the debug you collected and posted here and in FusionAuth/fusionauth-issues#1590 , that was very helpful.