-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 1.18 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
FROM eclipse-temurin:25-jdk AS build
WORKDIR /workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY .mvn/ .mvn/
COPY mvnw pom.xml ./
COPY src/ src/
COPY src/main/resources/application.properties.tmp src/main/resources/application.properties
COPY src/main/resources/application-neo4j.properties.tmp src/main/resources/application-neo4j.properties
RUN chmod +x mvnw
RUN ./mvnw -B org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \
-Dfile=src/main/resources/CPF-Toolbox/cpm-core-2.2.0.jar \
-DgroupId=cz.muni.fi.cpm \
-DartifactId=cpm-core \
-Dversion=2.2.0 \
-Dpackaging=jar \
-DgeneratePom=true
RUN ./mvnw -B org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \
-Dfile=src/main/resources/CPF-Toolbox/cpm-template-2.2.0.jar \
-DgroupId=cz.muni.fi.cpm \
-DartifactId=cpm-template \
-Dversion=2.2.0 \
-Dpackaging=jar \
-DgeneratePom=true
RUN ./mvnw -B package -DskipTests
FROM eclipse-temurin:25-jdk AS runtime
WORKDIR /app
COPY --from=build /workspace/target/*.jar /app/app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app/app.jar"]