javaee-docker-gradle icon indicating copy to clipboard operation
javaee-docker-gradle copied to clipboard

Java EE 7 Simple Application using Gradle and Docker

= Run Java EE Application as Docker Container using Gradle

This sample application shows how to package a Java EE 7 application as Docker image and run it within a container using Gradle Docker Plugin.

. ./gradlew build builds the application.

== Build Docker Image

. Start Docker for Mac . Run ./gradlew buildImage to create the Docker Image

== Run Docker Container

. Run ./gradlew startContainer to run the Docker Container . Access the application curl http://locahost:8080/javaee-docker-gradle/resources/persons. It shows the output: + [source, xml]

PennyLeonardSheldonAmyHowardBernadetteRajPriya