From 2d4b1d3ea71c6809780d660a44d3ce3eaf5708ce Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 10 Dec 2024 15:27:30 -0700 Subject: [PATCH] wip --- backend/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index eb014626..476997c1 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,9 +1,11 @@ -FROM openjdk:11-jre-slim -ENV HOME=/app -RUN mkdir -p $HOME -WORKDIR $HOME +FROM openjdk:11-jre-slim as build +WORKDIR /app/ +ARG JAR_FILE +ADD ./backend /app/backend +FROM openjdk:11-jre-slim ARG JAR_FILE -COPY ${JAR_FILE} app.jar +COPY --from=build ${JAR_FILE} app.jar + EXPOSE 8081 ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file