diff --git a/3.4.6/centos/7/Dockerfile b/3.4.6/centos/7/Dockerfile index 77281d2..12896af 100644 --- a/3.4.6/centos/7/Dockerfile +++ b/3.4.6/centos/7/Dockerfile @@ -4,6 +4,11 @@ RUN yum install -y java-1.7.0-openjdk-headless tar RUN curl -fL http://mirror.catn.com/pub/apache/zookeeper/stable/zookeeper-3.4.6.tar.gz | tar xzf - -C /opt && mv /opt/zookeeper-3.4.6 /opt/zookeeper +RUN echo "networkaddress.cache.ttl=0" >> /usr/lib/jvm/jre/lib/security/java.security && \ + sed -i 's/networkaddress.cache.negative.ttl=10/networkaddress.cache.negative.ttl=0/g' /usr/lib/jvm/jre/lib/security/java.security + +EXPOSE 2181 2888 3888 + VOLUME /tmp/zookeeper COPY entrypoint.sh / diff --git a/3.4.6/centos/7/entrypoint.sh b/3.4.6/centos/7/entrypoint.sh index 3ca7b6a..d49a875 100755 --- a/3.4.6/centos/7/entrypoint.sh +++ b/3.4.6/centos/7/entrypoint.sh @@ -1,12 +1,13 @@ -#!/bin/sh +#!/bin/bash # based on https://github.com/apache/zookeeper/blob/trunk/conf/zoo_sample.cfg cat > /opt/zookeeper/conf/zoo.cfg <> /etc/java-7-openjdk/security/java.security && \ + sed -i 's/networkaddress.cache.negative.ttl=10/networkaddress.cache.negative.ttl=0/g' /etc/java-7-openjdk/security/java.security + +EXPOSE 2181 2888 3888 + VOLUME /tmp/zookeeper COPY entrypoint.sh / diff --git a/3.4.6/ubuntu/14.04/entrypoint.sh b/3.4.6/ubuntu/14.04/entrypoint.sh index 3ca7b6a..d49a875 100755 --- a/3.4.6/ubuntu/14.04/entrypoint.sh +++ b/3.4.6/ubuntu/14.04/entrypoint.sh @@ -1,12 +1,13 @@ -#!/bin/sh +#!/bin/bash # based on https://github.com/apache/zookeeper/blob/trunk/conf/zoo_sample.cfg cat > /opt/zookeeper/conf/zoo.cfg <