Skip to content

Commit

Permalink
chore(Docker): Add Dockerfile to generate wise-api-server. Add Docker…
Browse files Browse the repository at this point in the history
…file.dev to generate wise-api-dev
  • Loading branch information
hirokiterashima committed Jul 12, 2024
1 parent 3063f63 commit 5067409
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
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"]
8 changes: 8 additions & 0 deletions Dockerfile.dev
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

0 comments on commit 5067409

Please sign in to comment.