-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 959 Bytes
/
Dockerfile
File metadata and controls
33 lines (27 loc) · 959 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
FROM maven:3-openjdk-17 AS MAVEN_BUILD
ENV BUILD_HOME /home/safnari
ENV HOME /nsi-dds
WORKDIR $HOME
COPY . .
RUN mvn clean install -Dmaven.test.skip=true -Ddocker.nocache
FROM openjdk:17
ENV HOME /nsi-dds
#DEBUG_OPTS: "-Djavax.net.debug=ssl:handshake:verbose:keymanager:trustmanager -Djava.security.debug=access:stack:certpath"
ENV DEBUG_OPTS ""
ENV LOGBACK "/nsi-dds/config/logback.xml"
USER 1000:1000
WORKDIR $HOME
COPY --from=MAVEN_BUILD $HOME/target/nsi-dds*.jar ./dds.jar
COPY --from=MAVEN_BUILD $HOME/target/lib ./lib
COPY --from=MAVEN_BUILD $HOME/config ./config
EXPOSE 8401/tcp
CMD java \
-Xmx1024m -Djava.net.preferIPv4Stack=true \
-Dcom.sun.xml.bind.v2.runtime.JAXBContextImpl.fastBoot=true \
-Djava.util.logging.config.file=/nsi-dds/config/logging.properties \
-Dlogging.config=$LOGBACK \
-Dlogback.configurationFile=$LOGBACK \
$DEBUG_OPTS \
-cp /nsi-dds/lib \
-Dbasedir=/nsi-dds \
-jar /nsi-dds/dds.jar