This serves as an example project to reproduce the issue found by github user @atrianic and filed to youtrack here
There are micronaut dependencies in the project (since he found it as a result of working on a micronaut ktor project), but I believe a similar result could be achieved without any micronaut pieces in the puzzle.
This issue was originally reported to mirconaut-kotlin
To reproduce the issue:
- run the
./docker-build-jvm.sh
script file, - then run
docker run -p 8080:8080 micronaut-api-jvm
- in a separate shell, run
curl localhost:8080/
and receive a plaintext "Hello World" response (illustrating the hotspot JVM runs the ktor app successfully) - run the
./docker-build.sh
script file, NOTE: This may take a fair bit of system resources; I struggled to run it on my 16gb RAM 2015 Macbook Pro, the build kept failing with a 137 exit code - run
docker run -p 8080:8080 micronaut-api
- in a separate shell, run
curl localhost:8080/
and no response (illustrating the graal JVM is having some kind of issue registering routes)