try change image building to buildah
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
# ---- Pull Maven from its official image (avoids microdnf under QEMU) ----
|
||||
FROM maven:3.9.9-eclipse-temurin-21 AS maven-dist
|
||||
FROM docker.io/library/maven:3.9.9-eclipse-temurin-21 AS maven-dist
|
||||
|
||||
# ---- Build stage: GraalVM 25 + Maven ----
|
||||
ARG TARGETPLATFORM=linux/arm64
|
||||
FROM --platform=$TARGETPLATFORM ghcr.io/graalvm/native-image-community:25 AS build
|
||||
FROM ghcr.io/graalvm/native-image-community:25 AS build
|
||||
|
||||
# Copy Maven from the official Maven image — no package installation needed
|
||||
COPY --from=maven-dist /usr/share/maven /opt/maven
|
||||
@@ -19,8 +18,8 @@ RUN mvn -Pnative dependency:resolve dependency:resolve-plugins -q
|
||||
COPY src ./src
|
||||
RUN mvn -Pnative package -DskipTests
|
||||
|
||||
# ---- Runtime stage: minimal ARM64 distroless ----
|
||||
FROM --platform=$TARGETPLATFORM gcr.io/distroless/base-nossl-debian12
|
||||
# ---- Runtime stage: slim Debian with glibc + libz (required by GraalVM native binary) ----
|
||||
FROM docker.io/library/debian:12-slim
|
||||
COPY --from=build /app/target/ai-teacher-backend /app/ai-teacher-backend
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/app/ai-teacher-backend"]
|
||||
|
||||
Reference in New Issue
Block a user