Docker Community Forums

Share and learn in the Docker community.

Gradle Build in Docker Container


(Dockerexpert) #1

Can you guide me on how to dockerize gradle build using Dockerfile, & push the generate jar artifacts to artifactory.

(Dbrunkow) #2

I’ve used Jenkins and specified the build to run in a container. From there, you could use the Artifactory plugin to push the compiled jar to a Artifactory. At the end of the build, your container goes away, nice and clean. One other note, you can use the grade wrapper if you don’t want to install gradle into the container. Store your version of gradle in artifactory and point the file at it if you want faster downloads for the zip.

(Dockerexpert) #3

Thanks for your response. Where should i locate , appreaciated if you can share your Dockerfile.