fix: build JAR locally, use minimal JRE image
Some checks failed
Build & Deploy Java API / build (push) Failing after 40s

This commit is contained in:
gitea-ci
2026-07-22 01:23:14 +08:00
parent ddf7c1e55a
commit 782ae3240d
2 changed files with 8 additions and 11 deletions

View File

@@ -1,16 +1,8 @@
# Multi-stage build with Chinese registry mirror
FROM registry.cn-hangzhou.aliyuncs.com/chenxipan/maven:3.9-eclipse-temurin-17 AS builder
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package -DskipTests
# Production stage
# Production image - JAR is pre-built locally
FROM eclipse-temurin:17-jre-alpine
WORKDIR /app
COPY --from=builder /app/target/*.jar app.jar
COPY target/*.jar app.jar
EXPOSE 8080