I'm using Spring boot plugin 3.1.0
build.gradle.kts:
tasks.named<BootBuildImage>("bootBuildImage") {
tags.add("europe-west1-docker.pkg.dev/my-project/my-docker-registry/${project.name}:$version")
imageName.set("europe-west1-docker.pkg.dev/my-project/my-docker-registry/${project.name}:$version")
}
during the run, it hangs for several minutes and fails:
* What went wrong:
Execution failed for task ':bootBuildImage'.
> Unable to parse image reference "europe-west1-docker.pkg.dev/my-project/my-docker-registry/app:9.9.9". Image reference must be in the form '[domainHost:port/][path/]name[:tag][@digest]', with 'path' and 'name' containing only [a-z0-9][.][_][-]
It is strange enough, but it fails only if this is configured in a gradle script, but it works fine if the same tag is passed as a parameter:
./gradlew bootBuildImage --image-name=europe-west1-docker.pkg.dev/my-project/my-docker-registry/app:9.9.9