Issue
In eclipse terminal, I am trying to create a docker image of Springboot project.
Command: mvn spring-boot:build-image
In the end I am getting 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
Could someone help me out here.
Solution
@ANEESH T.G , I tried below way which is working fine.
a) Create a Docker file named as Dockerfile for SpringBoot project with below detail
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
b) Open Eclipse Terminal for that project, Select Project-> Right Click -> Show in Local Terminal -> Terminal
c) Ran below command
docker build -t springio/gs-spring-boot-docker .
And here you go....!!
Please find the screenshot below and reference document
Answered By - Kms
Answer Checked By - David Marino (JavaFixing Volunteer)