Skip to content

Commit

Permalink
try diff dockerfile fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed Dec 6, 2024
1 parent eb399bf commit d81fa29
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
FROM amazoncorretto:17
ENV HOME=/app
RUN mkdir -p $HOME
WORKDIR $HOME
FROM eclipse-temurin:17.0.8_7-jdk as build

WORKDIR /app/

ADD ./backend /app/backend
ADD .git /app/.git

# compile backend into a jar
RUN cd backend && ./gradlew clean build -x test -x checkstyleMain -x spotlessCheck

FROM eclipse-temurin:17.0.8_7-jre

COPY --from=build /app/backend/build/libs/*.jar app.jar

ENTRYPOINT ["java","-jar","/app.jar"]

EXPOSE 8081

0 comments on commit d81fa29

Please sign in to comment.