diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/docker/Dockerfile | 4 | ||||
-rw-r--r-- | src/main/docker/scripts/start-zookeeper.sh | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 77dcf59..37bc513 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -50,4 +50,6 @@ RUN set -x \ && ln -s /opt/zookeeper/$ZK_DIST.jar /usr/share/zookeeper/ \ && ln -s /opt/zookeeper/lib/* /usr/share/zookeeper -RUN chmod -R 777 /opt/zookeeper/bin
\ No newline at end of file +RUN chmod -R 777 /opt/zookeeper/bin +ENTRYPOINT /opt/zookeeper/bin/start-zookeeper.sh +EXPOSE 2181 2888 3888 diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh index e80484f..3765be8 100644 --- a/src/main/docker/scripts/start-zookeeper.sh +++ b/src/main/docker/scripts/start-zookeeper.sh @@ -67,10 +67,10 @@ function validate_env() { echo "ZK_PURGE_INTERVAL=$ZK_PURGE_INTERVAL" echo "ZK_PRE_ALLOC_SIZE=$ZK_PRE_ALLOC_SIZE" - if [ $ZK_REPLICAS -gt 1 ] then + if [ $ZK_REPLICAS -gt 1 ]; then echo "ENSEMBLE" print_servers - fi + fi echo "Environment validation successful" } @@ -119,7 +119,7 @@ function create_data_dirs() { if [ $ZK_REPLICAS -gt 1 ] && [ ! -f $ID_FILE]; then echo $MY_ID >> $ID_FILE - fi + fi echo "Created ZooKeeper data directories and set permissions in $ZK_DATA_DIR" } |