-
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.
chore(Docker): Add Dockerfile to generate wise-api-server. Add Docker…
…file.dev to generate wise-api-dev
- Loading branch information
1 parent
3063f63
commit 5067409
Showing
2 changed files
with
17 additions
and
7 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,10 +1,12 @@ | ||
FROM maven:3.9.6-eclipse-temurin-17 | ||
# Generate wise-api-server Docker image | ||
|
||
# Stage 1: Build application | ||
FROM maven:3.9.6-eclipse-temurin-17 as build | ||
WORKDIR /app | ||
COPY . . | ||
RUN mvn package | ||
|
||
COPY pom.xml . | ||
RUN mvn dependency:go-offline | ||
|
||
COPY src/ /app/src/ | ||
|
||
CMD mvn spring-boot:run -Dspring-boot.run.profiles=dockerdev | ||
# Stage 2: Copy war | ||
FROM eclipse-temurin:17 | ||
COPY --from=build /app/target/wise.war wise.war | ||
ENTRYPOINT ["java","-jar","/wise.war", "--spring.config.location=/application.properties"] |
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,8 @@ | ||
# Generate wise-api-dev Docker image | ||
|
||
FROM maven:3.9.6-eclipse-temurin-17 | ||
WORKDIR /app | ||
COPY pom.xml . | ||
RUN mvn dependency:go-offline | ||
COPY src/ /app/src/ | ||
CMD mvn spring-boot:run -Dspring-boot.run.profiles=dockerdev |