Andrew O'Hara
05/07/2024, 5:11 PMJames Richardson
05/07/2024, 6:05 PMAndrew O'Hara
05/07/2024, 6:06 PMJames Richardson
05/07/2024, 6:08 PMJames Richardson
05/07/2024, 6:08 PMAndrew O'Hara
05/07/2024, 6:09 PMJames Richardson
05/07/2024, 6:13 PM./gradlew nativeCompile
Should be enough...Andrew O'Hara
05/07/2024, 6:14 PMAndrew O'Hara
05/07/2024, 9:19 PMdave
05/07/2024, 10:03 PMdave
05/07/2024, 10:04 PMAndrew O'Hara
05/07/2024, 10:26 PMtasks.named<io.micronaut.gradle.docker.NativeImageDockerfile>("dockerfileNative") {
baseImage = "amazonlinux:2"
jdkVersion = "21"
}
So it essentially does what the http4k graal tutorial teaches you to do, but with more options on builder image (e.g. AL 2023). I'm not entirely sure how it loads the graal runtime into a blank AL2 container, but let's say it's magic for now. Now with the standard graal plugin for gradle, it appears that it will only use your local graal jvm, and target your host platform. No option to use docker.
What I'm hoping for is a generic plugin to do what micronaut does. Not only does this mean I don't have to have the Graal toolchain installed, but it also means I can target other environments easily. For example, a native image built on AL2 will not work on an AL2023 runtime.dave
05/08/2024, 7:57 AMAndrew O'Hara
05/08/2024, 1:57 PM