Kotlin Native - Docker Container
This Project is an Ubuntu based container to compile kotlin native applications.
Information about the latest stable version
Currently supported versions
Following branches and tags are supported.
each other tag/branch might or might not work.
Checkout the kotlin native samples
Use following command to checkout the kotlin native samples from the JetBrains/kotlin-native git repository.
mkdir kotlin-native-samples && \ cd kotlin-native-samples && \ git init && \ git config core.sparseCheckout true && \ git remote add -f origin https://github.com/JetBrains/kotlin-native.git && \ echo "samples/*" > .git/info/sparse-checkout && \ git checkout v0.3 # use other branch/tag if needed
Compile your first sample
Run the following command to install the needed dependency inside the docker container and then run the build of the kotlin native curl sample.
docker run --rm -ti --workdir /sample -u root \ -v "$(pwd)/samples/libcurl:/sample" \ hemeroc/kotlin-native:v0.3.0 \ /bin/bash -c \ "apt-get update; apt-get install libcurl4-openssl-dev; ./build.sh"
Enjoy the result
The result is located in
./samples/libcurl/and is called
Just try it out:
As your newly built version of curl requires libcurl-openssl it obviously has to be installed on the system where you are trying to run the binary.