Thanks to GraalVM
specifically, building a 'native-image' so you don't need the JVM anymore.
Right.
This repo contains the base GraalVM (with native-image) docker image, which can be used to then build a clojure application into a native binary.
A bare-bones example clojure application is located in the /example
directory.
# cd example/hello
# lein repl
user=> (require 'com.example.hello)
nil
user=> (compile 'com.example.hello)
com.example.hello
user=> quit
Bye for now!
# ./pull-in-clojure.sh
docker pull tuddman/graalvm:latest
or
cd <basedir>
docker build -t tuddman/graalvm:latest .
cd example/hello
docker build -t hello-clj-on-graalvm .
$ docker inspect hello-clj-on-graalvm | jq .[0].Size