I created Dockerfile which contains following code -
FROM alpine/git as clone
WORKDIR /app
RUN git clone GitHub - joharianant/FirstProject: My First Java Project
FROM maven:3.5-jdk-8-alpine as build
WORKDIR /app
COPY --from=clone /app/FirstProject /app
RUN mvn install
CMD [“echo”,“Stage 2 complete”]
FROM openjdk:8-jre-alpine
WORKDIR /app
COPY --from=build /app/target/firstproject-1.0-snapshot.jar /app
CMD [“java -jar firstproject-1.0-snapshot.jar”]
It is giving below error -
=> ERROR [stage-2 3/3] COPY --from=build /app/target/firstproject-1.0-snapshot.jar /app 0.> [stage-2 3/3] COPY --from=build /app/target/firstproject-1.0-snapshot.jar /app:
failed to compute cache key: “/app/target/firstproject-1.0-snapshot.jar” not found: not found
Could someone pls. point the issue.