This image contains the Micronaut CLI, Java-21 GraalVM, and SDKMAN on EuroLinux 9. This allows you to build and run Micronaut applications using GraalVM. Everything is installed with SDKMAN, so you can easily switch between different versions of Java.
The base image user is micronaut, and the working directory is /home/micronaut.
The native images require the gcc, glibc-devel and zlib-devel; they are installed in this image by default.
# Firstly, create a new Micronaut application
mn create-app example.sourcemation.testapp --build=maven --lang=java
# Change to application directory
cd testapp
# Run tests to check if everything is ok
./mvnw test
# Build native-image application
./mvnw package -Dpackaging=native-image
After runninig these commands on your local container, run the application with:
[micronaut@664a3ed677a9 testapp]$ /home/micronaut/testapp/target/testapp
__ __ _ _
| \/ (_) ___ _ __ ___ _ __ __ _ _ _| |_
| |\/| | |/ __| '__/ _ \| '_ \ / _` | | | | __|
| | | | | (__| | | (_) | | | | (_| | |_| | |_
|_| |_|_|\___|_| \___/|_| |_|\__,_|\__,_|\__|
20:54:19.413 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 15ms. Server Running: http://664a3ed677a9:8080
Content type
Image
Digest
sha256:3a5412be1…
Size
867.6 MB
Last updated
about 2 years ago
docker pull eurolinux/eurolinux-9-micronaut