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.
./gradlew jibDockerBuild
docker run -d -p 8080:8080 micronaut-jib:0.1
curl localhost:8080/hello
> Hello World
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
Learn more about Jib. Learn more about Micronaut.