-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 1013 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (25 loc) · 1013 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
29
30
31
32
33
34
35
# FluxPay Engine Dockerfile
# jammy (NOT alpine) — Alpine's musl libc crashes Gradle native-platform lib on ARM/Docker
FROM eclipse-temurin:21-jdk-jammy AS builder
WORKDIR /app
# Gradle wrapper & build files first for caching
COPY gradlew gradlew.bat ./
COPY gradle/ gradle/
COPY build.gradle settings.gradle ./
# Download dependencies (cached layer)
RUN ./gradlew dependencies --no-daemon || true
# Copy source
COPY src/ src/
# Build (skip tests — run separately)
RUN ./gradlew build -x test --no-daemon
# Runtime image
FROM eclipse-temurin:21-jre-jammy
WORKDIR /app
# Jolokia agent for JMX metrics exposure via HTTP
ARG JOLOKIA_VERSION=2.1.2
ADD https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-jvm/${JOLOKIA_VERSION}/jolokia-agent-jvm-${JOLOKIA_VERSION}-javaagent.jar \
/app/jolokia-agent-jvm.jar
# Copy built jar
COPY --from=builder /app/build/libs/*.jar app.jar
EXPOSE 8080 8778
ENTRYPOINT ["java", "-javaagent:/app/jolokia-agent-jvm.jar=port=8778,host=0.0.0.0", "-jar", "app.jar"]