-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (17 loc) · 727 Bytes
/
Dockerfile
File metadata and controls
28 lines (17 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM eclipse-temurin:25.0.2_10-jdk-noble AS build
ARG VERSION=local
WORKDIR /app
COPY gradlew settings.gradle.kts build.gradle.kts ./
COPY gradle ./gradle
COPY buildSrc ./buildSrc
RUN ./gradlew --no-daemon --version
COPY src ./src
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \
SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN 2>/dev/null || true) \
./gradlew assemble --parallel --no-daemon -Pversion=$VERSION
RUN java -Djarmode=tools -jar build/libs/*.jar extract --destination build/extracted
FROM gcr.io/distroless/java25-debian13 AS runtime
WORKDIR /app
COPY --from=build /app/build/extracted/lib ./lib
COPY --from=build /app/build/extracted/*.jar ./app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]