fix(build): Dockerfile 改为 jar-only 构建,修复策略组 DTO policies 类型为 List<Map<String,Object>>

This commit is contained in:
2026-07-07 18:21:28 +08:00
parent d43fbbcc3c
commit 3b5ddc8f74
4 changed files with 8 additions and 22 deletions

View File

@@ -1,26 +1,10 @@
FROM maven:3.9-eclipse-temurin-21-alpine AS builder
WORKDIR /app
COPY pom.xml ./pom.xml
COPY mci-shared ./mci-shared
COPY mci-channel-common ./mci-channel-common
COPY mci-channel-wecom/pom.xml ./mci-channel-wecom/pom.xml
COPY mci-channel-wecom/src ./mci-channel-wecom/src
COPY mci-server/pom.xml ./mci-server/pom.xml
COPY mci-server/src ./mci-server/src
RUN mvn -N install && \
mvn -f mci-shared/pom.xml install -DskipTests && \
mvn -f mci-channel-common/pom.xml install -DskipTests && \
mvn -f mci-channel-wecom/pom.xml install -DskipTests && \
mvn -f mci-server/pom.xml package -DskipTests
# syntax=docker/dockerfile:1
FROM eclipse-temurin:21-jre-alpine
RUN apk add --no-cache curl
WORKDIR /app
COPY --from=builder /app/mci-server/target/*.jar app.jar
COPY target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]