Skip to content

kameshsampath/buildpacks

Repository files navigation

My Cloud Native Java Buildpacks Repository

A collection of my Cloud Native Buildpacks for building Cloud Native Java Applications using

Pre-requisites

Download and install

Building Applications

SpringBoot

[[source,bash]

pack build example/helloboot \
   --builder quay.io/kameshsampath/java-11-jvm-builder:v1.0.0 \
   --path $PROJECT_HOME/apps/helloboot
Tip

If you have a maven repository manager , then you can run the builder with an environment variable MAVEN_MIRROR_URL as shown:

pack build example/helloboot \
   --env MAVEN_MIRROR_URL="<MAVEN_MIRROR_URL>" \
   --builder quay.io/kameshsampath/java-11-jvm-builder:tip \
   --path $PROJECT_HOME/apps/helloboot \
   --verbose

To run and test the image:

[[source,bash]

docker run -it --rm -p 8080:8080 example/helloboot

Doing curl localhost:8080/hello should return an response Hello SpringBoot!

Quarkus(JVM)

[[source,bash]

pack build example/helloquarkus \
   --builder quay.io/kameshsampath/java-11-jvm-builder:v1.0.0 \
   --path $PROJECT_HOME/apps/helloquarkus \
   --verbose

Quarkus(Native Mode)

[[source,bash]

pack build example/helloquarkus \
   --builder quay.io/kameshsampath/quarkus-native-builder:v1.0.0 \
   --path $PROJECT_HOME/apps/helloquarkus \
   --verbose

To run and test the image:

[[source,bash]

docker run -it --rm -p 8080:8080 example/helloquarkus

Doing curl localhost:8080/hello-resteasy should return an response Hello RESTEasy

Build the buildpacks locally

To build and install the buildpacks, builders locally, run:

[[source,bash]

make all