03/27/2023, 6:53 AM
Can anyone help me further? I want to create a CLI tool in Kotlin-native and use in from Docker. Locally on my mac I can build and use the tool but I get problems when I build it with Docker. On my M1 Mac I get:
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find :kotlin-native-prebuilt-linux-aarch64:1.8.0.
Searched in the following locations:
   - <>
I test it with a basic hallo world native application. Changed the
to support my M1:
kotlin {
    val hostOs = System.getProperty("")
    val arch = System.getProperty("os.arch")
    val isMingwX64 = hostOs.startsWith("Windows")
    val nativeTarget = when {
        hostOs == "Mac OS X" && arch == "aarch64" -> macosArm64("native")
        hostOs == "Mac OS X" -> macosX64("native")
        hostOs == "Linux" && arch == "aarch64" -> linuxArm64("native")
        hostOs == "Linux" -> linuxX64("native")
        isMingwX64 -> mingwX64("native")
        else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
FROM gradle:8-jdk17-focal AS builder
COPY . /app
RUN gradle build --warning-mode summary --stacktrace --scan

FROM ubuntu:focal
COPY --from=builder /app/build/bin/native/releaseExecutable ./
CMD ["./clean-native.kexe"]
It looks like the on the latest release linux-aarch64 does not exist. Is this possible and how could I do this?