Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.26 KB

03-ce.md

File metadata and controls

44 lines (28 loc) · 1.26 KB

App JAR

Build the App JAR with GraalVM Community Edition

You can use GraalVM Community JDK to generate a JAR for this app. We have a shell script that uses multistage Docker build to build a JAR file using Maven and ship the app JAR in a separate runtime docker image.

./scripts/build-jar-ce.sh

Run this command to see the docker image:

docker images -a

The output is similar to:

REPOSITORY                 TAG      IMAGE ID       CREATED          SIZE
jibber-jar-gvmce22-jdk17   0.0.1    4c23c1f3fb2d   24 seconds ago   656MB

Run the App JAR

A Docker Compose file has ben provided that will start the container. Most sections have been commented out. Feel free to uncomment sections, as needed.

Go to docker-compose.yml, comment the jibber-ni-gvmee-jdk17: section. Uncomment the jibber-jar-gvmce-jdk17: section and run the following command to run the app JAR.

docker compose up --remove-orphans

This will start the app JAR on port 8081. Go to http://localhost:8081/jibber in a browser and you should see a nonsense verse.

Stop the App JAR

From another terminal window, run the following command:

docker compose stop

Back to Table of Contents