From 2321ebcee9a9667d353c06e951e187d0dff9e1f7 Mon Sep 17 00:00:00 2001 From: Lauro Correia Silveira Date: Wed, 15 Nov 2023 10:40:11 +0100 Subject: [PATCH] Fix Dockerfile adding mven step to build image and remove target folder --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 179e96d..7630461 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ ARG DATABASE_TEST ## work directory by default WORKDIR /alura-flix-api -## copy all files from target and put in to work directory -COPY --from=build target/alura-flix-api-0.0.1-SNAPSHOT.jar alura-flix-api.jar +COPY --from=build target/*.jar alura-flix-api.jar +EXPOSE 8080 + ENTRYPOINT ["java", "-jar", "alura-flix-api.jar"] \ No newline at end of file