summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--standalone/src/main/assembly/Dockerfile12
-rw-r--r--standalone/src/main/assembly/docker/docker-entrypoint.sh7
2 files changed, 13 insertions, 6 deletions
diff --git a/standalone/src/main/assembly/Dockerfile b/standalone/src/main/assembly/Dockerfile
index 3ccd857..f8659c5 100644
--- a/standalone/src/main/assembly/Dockerfile
+++ b/standalone/src/main/assembly/Dockerfile
@@ -10,11 +10,11 @@ RUN apt-get update
RUN apt-get install -y openjdk-8-jdk
#configure the JDK
-RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/lib/security/java.security
-ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
-ENV PATH $PATH:/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/bin:/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin
-ENV CLASSPATH .:${JAVA_HOME}/lib:${JRE_HOME}/lib
-ENV JRE_HOME ${JAVA_HOME}/jre
+#RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/lib/security/java.security
+#ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
+#ENV PATH $PATH:/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/bin:/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin
+#ENV CLASSPATH .:${JAVA_HOME}/lib:${JRE_HOME}/lib
+#ENV JRE_HOME ${JAVA_HOME}/jre
#add esr related resources to the docker image
RUN mkdir /home/esr
@@ -23,5 +23,5 @@ ADD esr-server-*-linux64.tar.gz /home/esr/
RUN chmod 755 /home/esr/bin/*.sh
#ENTRYPOINT /home/esr/bin/run.sh
-ENTRYPOINT /home/esr/docker/docker-entrypoint.sh
+ENTRYPOINT ["/bin/bash" "/home/esr/docker/docker-entrypoint.sh"]
diff --git a/standalone/src/main/assembly/docker/docker-entrypoint.sh b/standalone/src/main/assembly/docker/docker-entrypoint.sh
index 93e5973..9328db6 100644
--- a/standalone/src/main/assembly/docker/docker-entrypoint.sh
+++ b/standalone/src/main/assembly/docker/docker-entrypoint.sh
@@ -21,5 +21,12 @@ done
# Configure service based on docker environment variables
/home/esr/docker/instance_config.sh
+# Set env
+sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/lib/security/java.security
+export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
+export PATH=$PATH:/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/jre/bin:/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin
+export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
+export JRE_HOME=${JAVA_HOME}/jre
+
# Start the microservice
/home/esr/docker/instance_run.sh