GraalVM Hello World with Docker
This utilizes a multi-stage build to: (1) download GraalVM, (2) build the source, and (3) copy into a final minimal image. The resulting image for HelloWorld.java is 7MB.
In the build stage, the native-image
CLI is used which compiles a class (or JAR) into a native executable which contains a embedded JVM called Substrate VM.
More information on ahead-of-time compilation in GraalVM can be found in the reference manual.