generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Administrator
committed
Dec 6, 2024
1 parent
eb399bf
commit d81fa29
Showing
1 changed file
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |