The Wayback Machine - https://web.archive.org/web/20200920044426/https://github.com/javaee-samples/javaee-docker-gradle
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

readme.adoc

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.

  1. ./gradlew build builds the application.

Build Docker Image

  1. Start Docker for Mac

  2. Run ./gradlew buildImage to create the Docker Image

Run Docker Container

  1. Run ./gradlew startContainer to run the Docker Container

  2. Access the application curl http://locahost:8080/javaee-docker-gradle/resources/persons. It shows the output:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><collection><person><name>Penny</name></person><person><name>Leonard</name></person><person><name>Sheldon</name></person><person><name>Amy</name></person><person><name>Howard</name></person><person><name>Bernadette</name></person><person><name>Raj</name></person><person><name>Priya</name></person></collection>

About

Java EE 7 Simple Application using Gradle and Docker

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.