error:Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.11:dockerBuild dockerizing JHipster-Registry

error:Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.11:dockerBuild dockerizing JHipster-Registry

当我运行这个命令时:

mvn -e package -Pprod verify jib:dockerBuild

jhipster-registry 标准项目中,为了对这个应用程序进行 docker 化,我得到这个错误:

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.11:dockerBuild (default-cli) on project jhipster-registry: Invalid image reference: JHipster Registry:5.0.0 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.11:dockerBuild (default-cli) on project jhipster-registry: Invalid image reference: JHipster Registry:5.0.0

Help1中建议的link是:

https://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

这是一个"generic error message"。 我的解决方案是:

docker system prune

清理注册表的 docker images/container 和构建 docker 图像就可以了。

从您的项目中删除目标文件,然后在终端内执行此命令./mvnw./mvnw install 然后在终端内使用此命令 mvn -e package -Pprod verify jib:dockerBuild 再试一次