-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (17 loc) · 703 Bytes
/
Dockerfile
File metadata and controls
28 lines (17 loc) · 703 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 maven:3.9-eclipse-temurin-25 AS build
WORKDIR /app
COPY pom.xml pom.xml
RUN mvn dependency:go-offline -B
ARG GIT_COMMIT=unknown
COPY src ./src
RUN mvn clean package -DskipTests -Dmaven.shade.skip=true -DbuildNumber=${GIT_COMMIT}
RUN mvn dependency:copy-dependencies -DoutputDirectory=target/deps -DincludeScope=runtime
FROM eclipse-temurin:25-jre-alpine
WORKDIR /app
RUN apk add --no-cache curl
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
COPY --from=build /app/target/deps/ libs/
COPY --from=build /app/target/classes/ classes/
ENTRYPOINT ["java", "-cp", "classes:libs/*","org.juv25d.App"]