Skip to content

Latest commit

 

History

History
 
 

micronaut

Containerize a Micronaut app with Jib

This is an example of how to easily build a Docker image for a Micronaut framework Groovy/Java application with Jib.

Dockerize Micronaut app with Jib

Quickstart

With Docker

./gradlew jibDockerBuild

docker run -d -p 8080:8080 micronaut-jib:0.1
curl localhost:8080/hello
> Hello World

Give it a Tweet

With Kubernetes

IMAGE=<your image, eg. gcr.io/my-project/micronaut-jib>

./gradlew jib --image=$IMAGE

kubectl run micronaut-jib --image=$IMAGE --port=8080 --restart=Never

# Wait until pod is running
kubectl port-forward micronaut-jib 8080 > /dev/null 2>&1 &
curl localhost:8080/hello
> Hello World

Give it a Tweet

More information

Learn more about Jib. Learn more about Micronaut.