Project

General

Profile

Download (1 KB) Statistics
| Branch: | Tag: | Revision:
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_ARG=1024M
10
ARG LOGDIR="/log/cdmserver"
11

    
12
ENV CDM_HOME=/data
13
ENV HEAP_SIZE=$HEAP_SIZE_ARG
14
ENV CPU_CORES=1
15
ENV DATASOURCES=$CDM_HOME/.cdmLibrary/datasources.xml
16

    
17
# java options which can be overwritten
18
ENV JAVA_OPTIONS="-Dspring.profiles.active=remoting"
19

    
20
# fixed java options which must not be overwritten
21
ENV JAVA_OPTS="-Xmx$HEAP_SIZE \
22
    -XX:+UseG1GC -XX:ParallelGCThreads=$CPU_CORES -XX:ConcGCThreads=$CPU_CORES  \
23
    -Duser.home=$CDM_HOME \
24
     -Dcdm.logDir=$LOGDIR"
25

    
26
ENV SERVER_ARGS="-forceSchemaUpdate -jmx"
27
ENV CDMSERVER_ARGS=" -httpPort=$CDMSERVER_PORT -Dcdm.logDir=$LOGDIR -datasources $DATASOURCES"
28

    
29
EXPOSE $CDMSERVER_PORT
30

    
31
CMD java $JAVA_OPTS $JAVA_OPTIONS  -jar /root/cdm-server.jar $SERVER_ARGS $CDMSERVER_ARGS
(2-2/7)