![](/img/trans.png)
[英]Failed to execute goal com.spotify:docker-maven-plugin:1.2.1:build (build-image)
[英]build-image failed, No digest found error when tried to create docker image
在 eclipse 终端中,我正在尝试创建 Springboot 项目的 docker 映像。
命令: mvn spring-boot:build-image
最后我得到No digest found error
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.5:build-image (default-cli) on project PROJECT_NAME: Execut
ion default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.5:build-image failed: No digest found -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
有人可以帮我吗。
@ANEESH TG,我尝试了以下工作正常的方式。
a) 为 SpringBoot 项目创建一个名为Dockerfile的 Docker 文件,详细信息如下
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
b) 打开该项目的 Eclipse 终端,Select 项目->右键单击->在本地终端中显示->终端
c) 运行低于命令
docker build -t springio/gs-spring-boot-docker .
在这里你 go....!!
请在下面找到截图和参考文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.