-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (38 loc) · 1.56 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (38 loc) · 1.56 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# syntax=docker/dockerfile:1.6
############################
# Build stage
############################
FROM maven:3.9.11-eclipse-temurin-25 AS build
ARG REVISION=1.0.0-SNAPSHOT
WORKDIR /workspace
COPY pom.xml .
COPY engine/pom.xml engine/pom.xml
COPY api-java/pom.xml api-java/pom.xml
COPY example-chat/pom.xml example-chat/pom.xml
COPY dashboard-java/pom.xml dashboard-java/pom.xml
RUN --mount=type=cache,target=/root/.m2 \
mvn -B -DskipTests -Dgpg.skip=true -Drevision=${REVISION} -pl engine -am dependency:go-offline
COPY . .
RUN --mount=type=cache,target=/root/.m2 \
mvn -B -DskipTests -Dgpg.skip=true -Drevision=${REVISION} -pl engine -am clean package
############################
# Runtime stage
############################
FROM eclipse-temurin:25-jre
ARG REVISION=1.0.0-SNAPSHOT
COPY --from=build /workspace/engine/target/sepa-engine-${REVISION}.jar /engine.jar
COPY --from=build /workspace/engine/src/main/resources/run.sh /run.sh
COPY --from=build /workspace/engine/src/main/resources/jmxremote.password /jmxremote.password
COPY --from=build /workspace/engine/src/main/resources/jmxremote.access /jmxremote.access
COPY --from=build /workspace/engine/src/main/resources/jmx.properties /jmx.properties
COPY --from=build /workspace/engine/src/main/resources/log4j2.xml /log4j2.xml
COPY --from=build /workspace/engine/src/main/resources/endpoints /endpoints
RUN chmod 600 /jmxremote.password && chmod 755 /run.sh
ENV JMX_HOSTNAME=0.0.0.0
ENV JMX_PORT=7090
EXPOSE 7090
EXPOSE 8000
EXPOSE 9000
ENV SIS_DATA=/var/lib/sis
RUN mkdir -p /var/lib/sis
ENTRYPOINT ["/run.sh"]