From a9e82e311a06d536699eefabdf13b89fbb8e6220 Mon Sep 17 00:00:00 2001 From: Andreas Kohlbecker Date: Mon, 11 Nov 2019 23:33:07 +0100 Subject: [PATCH] fix #8674 docker image based on ubuntu:bionic with openjdk8 and jemalloc --- src/main/docker/production/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/docker/production/Dockerfile b/src/main/docker/production/Dockerfile index 6fbe08a..a0101a1 100644 --- a/src/main/docker/production/Dockerfile +++ b/src/main/docker/production/Dockerfile @@ -1,4 +1,5 @@ -FROM anapsix/alpine-java:8 +FROM ubuntu:bionic +# using same image as for https://github.com/mariadb-corporation/mariadb-server-docker/blob/master/10.3/Dockerfile # paths of files and directories will be interpreted as relative to the source of the context of the build. @@ -10,6 +11,7 @@ FROM anapsix/alpine-java:8 # Artifacts are put into the folder maven/ inside the tar archive # 3. The tar archive is passed to the dockerdaemon and is used as working directory for the build #ADD target/docker/@project.groupId@/@project.artifactId@/@project.version@/build/maven/@project.build.finalName@.jar /root/cdm-server.jar +#ADD target/cdm-server-5.11.0-SNAPSHOT.jar /root/cdm-server.jar ADD maven/@project.artifactId@-@project.version@.jar /root/cdm-server.jar ARG CDMSERVER_PORT=8080 @@ -27,11 +29,14 @@ ENV JAVA_OPTIONS="-Dspring.profiles.active=remoting" # fixed java options which must not be overwritten ENV JAVA_OPTS="-Xmx$HEAP_SIZE \ -XX:+UseG1GC -XX:ParallelGCThreads=$CPU_CORES -XX:ConcGCThreads=$CPU_CORES \ - -Duser.home=$CDM_HOME $JAVA_OPTIONS" + -Duser.home=$CDM_HOME" ENV SERVER_ARGS="-forceSchemaUpdate -jmx" ENV CDMSERVER_ARGS=" -httpPort=$CDMSERVER_PORT -logdir=$LOGDIR -datasources $DATASOURCES" EXPOSE $CDMSERVER_PORT +RUN apt-get update; apt-get install -y openjdk-8-jre-headless libjemalloc1; apt-get clean +ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 + CMD java $JAVA_OPTS $JAVA_OPTIONS -jar /root/cdm-server.jar $SERVER_ARGS $CDMSERVER_ARGS -- 2.34.1