Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.34 KB

03-ee.md

File metadata and controls

46 lines (29 loc) · 1.34 KB

App JAR

Build the App JAR with GraalVM Enterprise Edition

You can use GraalVM Enterprise 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-ee.sh

If you are prompted to docker login to OCR, enter your OCR user and password.

Run this command to see the docker image:

docker images -a

The output is similar to:

REPOSITORY                 TAG      IMAGE ID       CREATED          SIZE
jibber-jar-gvmee22-jdk17   0.0.1    4cc0f93ca0eb   41 seconds ago   669MB

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-gvmee-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 8080. Go to http://localhost:8080/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