Transmode / gradle-docker

A Gradle plugin to build Docker images from the build script.
Apache License 2.0
647 stars 142 forks source link

Context directory clashes when multiple Docker tasks exist #18

Open mattgruter opened 10 years ago

mattgruter commented 10 years ago

If multiple Docker tasks exist in the same project, they all share the same default context directory (build/docker). This leads to conflicts between the different tasks.

The workaround is to set the contextDir task property to something unique for every task. This should however be automated and the default context directory should be unique for each task. Maybe set the context directory to build/docker/${task.name}? The task name must be unique making it a good candidate for the name of the context directory.

Also: rename the property stageDir to contextDir to be more aligned with Docker lingo.

sfitts commented 10 years ago

Agreed - making it match the task name by default makes sense.