加上容器化

This commit is contained in:
2026-08-03 22:32:14 +08:00
parent 42356d0f88
commit 80563bfb7b
5 changed files with 29 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
# 使用 Kotlin + JDK 的輕量化映像
FROM gradle:7.5.1-jdk17-alpine AS builder
WORKDIR /app
COPY . .
RUN gradle clean shadowJar --no-daemon
# 運行階段
FROM eclipse-temurin:21-jdk-ubi10-minimal
WORKDIR /app
COPY --from=builder /app/build/libs/*.jar app.jar
CMD ["java", "-jar", "app.jar", "com.ray650128.pcredive.ApplicationKt"]