-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (23 loc) · 830 Bytes
/
Copy pathDockerfile
File metadata and controls
24 lines (23 loc) · 830 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
FROM --platform=$BUILDPLATFORM eclipse-temurin:25-jdk-alpine AS builder
ARG APP_VERSION=0.1.0
ARG GITHUB_SHA=unknown
ARG BUILD_TIME=unknown
ENV GITHUB_SHA=$GITHUB_SHA
ENV BUILD_TIME=$BUILD_TIME
WORKDIR /app
COPY gradlew ./
COPY gradle/ ./gradle/
RUN ./gradlew --version --no-daemon -q
COPY build.gradle.kts gradle.properties settings.gradle.kts* ./
RUN ./gradlew dependencies --no-daemon -q || true
COPY src/ ./src/
RUN ./gradlew shadowJar --no-daemon -q -PappVersion="$APP_VERSION"
FROM eclipse-temurin:25-jre-alpine AS runner
RUN apk upgrade --no-cache \
&& addgroup -S typetype \
&& adduser -S typetype -G typetype
WORKDIR /app
COPY --from=builder /app/build/libs/typetype-server-all.jar app.jar
USER typetype
EXPOSE 8080
ENTRYPOINT ["java", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=75.0", "-jar", "app.jar"]