No signature of method: build_8uxeoxw0v35xxabibl49jhru8.docker()
Below is my build.gradle
plugins { id 'org.springframework.boot' version '2.3.1.RELEASE' id 'io.spring.dependency-management' version '1.0.9.RELEASE' id 'java' id("com.palantir.docker") version "0.25.0" id("com.palantir.docker-run") version "0.25.0" }
apply plugin:"com.palantir.docker"
docker { //line 50 name = "in28min/${project.name}:${version}" tag("name", "in28min/${project.name}:${version}") buildArgs(["name", "${project.name}"]) copySpec.from("build").into("build") pull(true) dockerfile file('Dockerfile') }
dockerRun { name = "${project.name}" image = "in28min/${project.name}:".plus(version) ports("8080:8080") }
AM getting the below error during the gradle build
Build file 'build.gradle' line: 50
A problem occurred evaluating root project 'currency-conversion-service'.
No signature of method: build_8uxeoxw0v35xxabibl49jhru8.docker() is applicable for argument types: (build_8uxeoxw0v35xxabibl49jhru8$_run_closure5) values: [build_8uxeoxw0v35xxabibl49jhru8$_run_closure5@249d76b5]
is this a bug? or am I doing anything wrong?
Having same problem
Same here, any solution ?
To anyone facing this issue. I ran into this with version 0.30.0.
In the OP's example the type that the name property is resolving to is a GString and not a String.
This causes the very cryptic type-error seen above.
Solve this by changing the property name to: project.name instead of: "${project.name}" fixes the issue.
Another related issue occurs when you define: tag 'someTag'.
This produces a similar type-error.
Solve this by providing an extra empty tag like so: tag 'someTag', '' or, use the deprecated: tags 'someTag'.
As a side-note, both the tag and tags property accept GStrings whereas name does not.