Spaces:
Build error
Build error
| # GraalVM Native Image - Ultra-fast startup, tiny size | |
| # Expected size: ~50-80MB, startup <100ms | |
| # Note: Requires native compilation support in Spring Boot | |
| # Stage 1: Native compilation | |
| FROM ghcr.io/graalvm/graalvm-ce:ol9-java21 as native-builder | |
| WORKDIR /app | |
| # Install native-image | |
| RUN gu install native-image | |
| # Copy source and build native executable | |
| COPY . . | |
| RUN ./gradlew nativeCompile | |
| # Stage 2: Minimal runtime | |
| FROM scratch | |
| COPY --from=native-builder /app/build/native/nativeCompile/app /app | |
| EXPOSE 8080 | |
| ENTRYPOINT ["/app"] | |