You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the following error (with Gradle 7.3):
* What went wrong:
Execution failed for task ':edge:dockerPrepare'.
> Entry Dockerfile is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.3/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
because the Dockerfile wants to be copied twice - once as part of the files config and then as itself. Providing a correct duplicatesStrategy for dockerPrepare could solve it, but it's impossible to do it without modifying the plugin code.
What did you want to happen?
It would be great if:
the dockerPrepare task provided a duplicatesStrategy that allows such a build to pass, or
it was possible to configure a duplicatesStrategy for this task per build.
I worked around it by changing the Gradle config like this:
I had a bit of the same issue. Problem is, that the dockerfile is in your src/main/docker folder. So it is first added with the files and than a second time with dockerfile
Solution 1:
Move Dockerfile to an other location than src/main/docker
What happened?
With a Gradle configuration like this one:
I'm getting the following error (with Gradle 7.3):
because the Dockerfile wants to be copied twice - once as part of the
files
config and then as itself. Providing a correctduplicatesStrategy
fordockerPrepare
could solve it, but it's impossible to do it without modifying the plugin code.What did you want to happen?
It would be great if:
dockerPrepare
task provided aduplicatesStrategy
that allows such a build to pass, orduplicatesStrategy
for this task per build.I worked around it by changing the Gradle config like this:
but I'd much prefer for it to work out of the box.
The text was updated successfully, but these errors were encountered: