Skip to content

Latest commit

 

History

History
51 lines (43 loc) · 1.44 KB

README.md

File metadata and controls

51 lines (43 loc) · 1.44 KB

About

This is an example of dockerized GraalVM native image build. Produced image is inherited from scratch, thus a few MB in size.

Project includes a Spark server with of couple of web resources:

  1. GET /exception - logs an exception
  2. GET /ping - returns "hi" message
  3. GET /person/1 - returns a simple dto
  4. POST /person - logs provided dto

Example:

curl --header --request POST --data {"name":"Joe"} http://localhost:8080/person

How to Run

If you are on windows, execute:

run.cmd

Docker image/container names: graalvm-native

Notes

Image size is under 20Mb.

Memory

docker stats

MEM USAGE/LIMIT: 1.605MiB / 4MiB

Links

GraalVM

Ahead-of-Time Compilation

Substrate VM

Limitations

Benchmarks

Gradle Palantir GraalVM Plugin

Alternative Examples