Running Piranha Nano on GraalVM

Can you run Piranha Nano using GraalVM? Yes! It is very easy to get started.

Use the Piranha Nano Hello World template

Go and click on "Use this template". Give your project a name and then click on "Create repository from template". Once it is done clone the project from the repository you created.

Build the project locally

To build the project locally use the following command line:

  mvn clean install

Create a GraalVM docker image

To make it easier to use GraalVM the template delivers you a Dockerfile-graalvm file that you can use to build the GraalVM binary.

To use it execute the following command line:

  docker build -t test -f Dockerfile-graalvm .

Run the GraalVM docker image

To use the generated Docker image execute the following Docker command line:

  docker run --rm -it -p 8080:8080 test

Now point your browser to http://localhost:8080/ and see Piranha Nano on GraalVM in action.

Posted February 9th, 2022