Skip to content

a-mankinenko/gradle-sample-app

 
 

Repository files navigation

Gradle Docker Codefresh example

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

If you are looking for Maven, then see this example

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.

To use this project in Codefresh

There is also a codefresh.yml for easy usage with the Codefresh CI/CD platform.

For the simple packaging pipeline see codefresh-package-only.yml

More details can be found in Codefresh documentation

Releases

No releases published

Packages

No packages published

Languages

  • Java 50.5%
  • Dockerfile 28.9%
  • HTML 20.6%