-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 1.19 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (23 loc) · 1.19 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
# Build the project
FROM maven:3-eclipse-temurin-8 AS builder
COPY pom.xml /usr/local/build/pom.xml
COPY src /usr/local/build/src
WORKDIR /usr/local/build
RUN mvn clean package -DskipTests -Dskip.npm=true -P jar
# Configure Docker Image
FROM eclipse-temurin:21-jre-jammy
RUN apt-get update && \
apt-get install -y --no-install-recommends fontconfig && \
fc-cache -f && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /home/groupdocs/app && \
mkdir -p /home/groupdocs/app/DocumentSamples && \
mkdir -p /home/groupdocs/app/Licenses
WORKDIR /home/groupdocs/app
COPY /DocumentSamples /home/groupdocs/app/DocumentSamples
COPY /configuration.yml /home/groupdocs/app/configuration.yml
COPY /logback-spring.xml /home/groupdocs/app/logback-spring.xml
COPY --from=builder /usr/local/build/target/annotation-spring-*.jar /home/groupdocs/app/app.jar
EXPOSE 8080
ENV JAVA_TOOL_OPTIONS="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"
ENTRYPOINT [ "java", "-jar", "-Dlogback.configurationFile=/home/groupdocs/app/logback-spring.xml", "app.jar", "configuration.yml" ]