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