Sign inSign up

opeseurope/graalvm

By opeseurope

•Updated over 7 years ago

GraalVM build image

Image
0

167

opeseurope/graalvm repository overview

⁠Clojure without the JVM

Thanks to GraalVM⁠

specifically, building a 'native-image' so you don't need the JVM anymore.

Right.

⁠Contents

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.

⁠Getting Started

⁠compile the clojure into *.class files
# 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

⁠get the docker image

docker pull tuddman/graalvm:latest

or

⁠build the docker images from source

⁠build base GraalVM docker image
cd <basedir>
docker build -t tuddman/graalvm:latest .
⁠build clojure example docker image
cd example/hello
docker build -t hello-clj-on-graalvm .
⁠see how much smaller the compiled binary is
$ docker inspect hello-clj-on-graalvm | jq .[0].Size

⁠Docker base GraalVM

tuddman/graalvm⁠

⁠Thanks to ...

Tag summary

Content type

Image

Digest

Size

439.7 MB

Last updated

over 7 years ago

docker pull opeseurope/graalvm