Plugin for building docker images
- plugin does not add any task, it is useful if you would like to add build tags manually
- All images built can be pushed by
publish
task
To apply the plugin:
plugins {
id 'com.itiviti.docker-build' version '1.0.0'
}
or
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.itiviti.gradle:gradle-docker-build-plugin:1.0.0'
}
}
apply 'com.itiviti.docker-build'
or
docker {
registry = 'your registry host' // optional
imageName = 'your image name' // applies to all DockerBuildTask if set
}
tasks.register('dockerBuildLTS', com.itiviti.gradle.DockerBuildTask) {
tags = [ '3.0' ]
workingDir './3.0'
}
tasks.register('dockerBuildLatest', com.itiviti.gradle.DockerBuildTask) {
tags = [ 'latest', '4.1' ]
workingDir './4.1'
}