Project

General

Profile

Download (1006 Bytes) Statistics
| Branch: | Tag: | Revision:
1 ed5ad657 Andreas Kohlbecker
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 35066a11 Andreas Kohlbecker
ARG HEAP_SIZE_ARG=1024M
10 ed5ad657 Andreas Kohlbecker
ARG LOGDIR="/log/cdmserver"
11
12
ENV CDM_HOME=/data
13 35066a11 Andreas Kohlbecker
ENV HEAP_SIZE=$HEAP_SIZE_ARG
14 ed5ad657 Andreas Kohlbecker
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 b2c1eebc Andreas Kohlbecker
ENV JAVA_OPTS="-Xmx$HEAP_SIZE \
22 ed5ad657 Andreas Kohlbecker
    -XX:+UseG1GC -XX:ParallelGCThreads=$CPU_CORES -XX:ConcGCThreads=$CPU_CORES  \
23
    -Duser.home=$CDM_HOME $JAVA_OPTIONS"
24
25 b2c1eebc Andreas Kohlbecker
ENV SERVER_ARGS="-forceSchemaUpdate -jmx"
26
ENV CDMSERVER_ARGS=" -httpPort=$CDMSERVER_PORT -logdir=$LOGDIR -datasources $DATASOURCES"
27 ed5ad657 Andreas Kohlbecker
28
EXPOSE $CDMSERVER_PORT
29
30
CMD java $JAVA_OPTS $JAVA_OPTIONS  -jar /root/cdm-server.jar $SERVER_ARGS $CDMSERVER_ARGS