Last active
May 5, 2018 01:08
-
-
Save janoulle/00e085d7eef6a73f3e22c8cf9049b4ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//generates image like this: $project.group/applicationName:tagVersion | |
task image(type: Docker, dependsOn: build ) { | |
project.group = '' //this prevents the generated image from having the group value added. Personal preference to do this | |
applicationName = "yourapp" | |
dockerfile = file('Dockerfile') | |
tagVersion = 'latest' | |
doFirst { | |
copy { | |
from jar | |
into "${stageDir}/target" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment