1
|
FROM anapsix/alpine-java:8
|
2
|
|
3
|
# paths of files and directories will be interpreted as relative to the source of the context of the build.
|
4
|
|
5
|
### ADD directive for building the image manually using the docker command
|
6
|
ADD target/cdm-server-*.jar /root/cdm-server.jar
|
7
|
|
8
|
ARG CDMSERVER_PORT=8080
|
9
|
ARG HEAP_SIZE=1024M
|
10
|
ARG LOGDIR="/log/cdmserver"
|
11
|
|
12
|
ENV CDM_HOME=/data
|
13
|
ENV NAME=cdmserver
|
14
|
ENV DESC="CDM Server"
|
15
|
# ENV CDMSERVER_SHUTDOWN=30
|
16
|
ENV CPU_CORES=1
|
17
|
ENV DATASOURCES=$CDM_HOME/.cdmLibrary/datasources.xml
|
18
|
|
19
|
# java options which can be overwritten
|
20
|
ENV JAVA_OPTIONS="-Dspring.profiles.active=remoting"
|
21
|
|
22
|
# fixed java options which must not be overwritten
|
23
|
ARG JAVA_OPTS="-Xmx$HEAP_SIZE \
|
24
|
-XX:+UseG1GC -XX:ParallelGCThreads=$CPU_CORES -XX:ConcGCThreads=$CPU_CORES \
|
25
|
-Duser.home=$CDM_HOME $JAVA_OPTIONS"
|
26
|
|
27
|
ARG SERVER_ARGS="-forceSchemaUpdate -jmx"
|
28
|
|
29
|
ENV CDMSERVER_ARGS="-httpPort=$CDMSERVER_PORT -logdir=$LOGDIR -datasources $DATASOURCES"
|
30
|
|
31
|
EXPOSE $CDMSERVER_PORT
|
32
|
|
33
|
CMD java $JAVA_OPTS $JAVA_OPTIONS -jar /root/cdm-server.jar $SERVER_ARGS $CDMSERVER_ARGS
|