Add method to support a Provider
package com.bmuschko.gradle.docker.tasks.image
import org.gradle.api.DefaultTask
+import org.gradle.api.file.RegularFile
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.ListProperty
import org.gradle.api.provider.Provider
@@ -88,6 +89,10 @@ class Dockerfile extends DefaultTask {
instructionsFromTemplate(project.file(templatePath))
}
+ void instructionsFromTemplate(Provider<RegularFile> templateFile) {
+ instruction(templateFile.get().asFile)
+ }
+
/**
* Adds a full instruction as String.
*
