-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix: reduce size docker image file.
- Loading branch information
1 parent
21cf1f8
commit 5bd6b98
Showing
3 changed files
with
47 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM eclipse-temurin:21-jdk-alpine AS build | ||
|
||
RUN apk add --no-cache maven | ||
|
||
COPY src /app/src | ||
COPY pom.xml /app | ||
|
||
WORKDIR /app | ||
RUN mvn clean package -DskipTests -U \ | ||
&& rm -rf /root/.m2 \ | ||
&& rm -rf /app/src | ||
|
||
# Run stage | ||
FROM eclipse-temurin:21-jre-alpine | ||
|
||
WORKDIR /usr/src/app | ||
COPY --from=build /app/target/QualityLabPro-0.7.jar ./app.jar | ||
|
||
ENV SPRING_PROFILES_ACTIVE=prod \ | ||
SERVER_PORT=8080 | ||
|
||
EXPOSE ${SERVER_PORT} |
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