From ea5c5f919f707341ad89cd74137b9a6679f47ef1 Mon Sep 17 00:00:00 2001 From: Haig Nalbandian Date: Thu, 21 Mar 2024 17:54:26 -0500 Subject: [PATCH] Fixing incorrect docker command The first stage of this Dockerfile runs COPY from the host machine into the container. The intent is to rename the jar already built *in* the container for use in the second stage, hence RUN mv --- demo/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/Dockerfile b/demo/Dockerfile index 747aec2..4be1549 100644 --- a/demo/Dockerfile +++ b/demo/Dockerfile @@ -9,7 +9,7 @@ COPY src src RUN --mount=type=cache,target=/root/.m2 ./mvnw install -DskipTests ARG JAR_FILE=target/*.jar -COPY ${JAR_FILE} target/application.jar +RUN mv ${JAR_FILE} target/application.jar RUN java -Djarmode=layertools -jar target/application.jar extract --destination target/extracted FROM eclipse-temurin:17-jdk-alpine