Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 496 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 496 Bytes

Gradle Docker example

This is an example Java application that uses Spring Boot 2, Gradle and Docker.

Create a multi-stage docker image

To compile and package using Docker multi-stage builds

docker build . -t my-app

Create a Docker image packaging an existing jar

./gradlew build
docker build . -t my-app -f Dockerfile.only-package

To run the docker image

docker run -p 8080:8080 my-app

And then visit http://localhost:8080 in your browser.