Skip to content

Commit

Permalink
Update graalvm.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjsix authored Sep 18, 2023
1 parent bd543d7 commit d2b292c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/graalvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ In order to use Java or Kotlin plugins on RESTHeart native you must build them a

Refer to [Deploy Java Plugins On Restheart Native](https://restheart.org/docs/plugins/deploy/#deploy-java-plugins-on-restheart-native) for detailed instructions on how to do it.

## build native image

Build image for local OS

```bash
$ ./mvnw clean package -Pnative -DskipTests
```

__Note__: Linux needs to use the `G1` garbage collector. This is obtained by passing the `-Dnative.gc="--gc=G1"` property to maven.

## A docker image to build Linux native images

[SoftInstigate](https://softinstigate.com) maintains the Debian based, docker image [softinstigate/graalvm-maven](https://github.com/SoftInstigate/graalvm-maven-docker) with GraalVM and Maven and `native-image`.
Expand All @@ -175,7 +185,9 @@ $ docker run -it --rm \
-v "$PWD":/opt/app \
-v "$HOME"/.m2:/root/.m2 \
softinstigate/graalvm-maven \
clean package -Pnative
clean package -Pnative -DskipTests -Dnative.gc="--gc=G1"
```

native-image arguments are defined in [this file](https://github.com/SoftInstigate/restheart/blob/master/core/src/main/resources/META-INF/native-image/org.restheart/restheart/native-image.properties).

</div>

0 comments on commit d2b292c

Please sign in to comment.