gradle-docker icon indicating copy to clipboard operation
gradle-docker copied to clipboard

Context directory clashes when multiple Docker tasks exist

Open mattgruter opened this issue 11 years ago • 1 comments

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.

mattgruter avatar Jul 28 '14 01:07 mattgruter

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

sfitts avatar Jul 28 '14 21:07 sfitts