summaryrefslogtreecommitdiffstats
path: root/src/main/docker
diff options
context:
space:
mode:
authorsunil unnava <sunil.unnava@att.com>2018-11-23 16:40:05 -0500
committersunil unnava <sunil.unnava@att.com>2018-11-23 16:40:24 -0500
commit1e6634c90047e8c340b904c1b8f5b07a3fe8b08e (patch)
tree84ae555f7d0ef840e63c92a1e826f27ef90eeef6 /src/main/docker
parentb8c642ebe54f23bb0f6e8696e8486ac357716b41 (diff)
Changes to ZK config generation
Issue-ID: DMAAP-888 Change-Id: I470263b6d5e0b114e89397614b1066f6344d9efe Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main/docker')
-rw-r--r--src/main/docker/Dockerfile10
-rw-r--r--src/main/docker/scripts/start-zookeeper.sh3
2 files changed, 9 insertions, 4 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index 2f91717..61ac9e5 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -42,6 +42,9 @@ RUN set -x \
# Copy configuration generator script to bin
COPY scripts /opt/zookeeper/bin/
+RUN chown -R $ZK_USER:$ZK_USER /opt/zookeeper/bin/start-zookeeper.sh
+RUN chown -R $ZK_USER:$ZK_USER /opt/zookeeper/bin/start-metrics.sh
+RUN chown -R $ZK_USER:$ZK_USER /opt/zookeeper/bin/zookeeper-ready.sh
# Create a user for the zookeeper process and configure file system ownership
# for necessary directories and symlink the distribution as a user executable
@@ -56,5 +59,8 @@ RUN set -x \
&& ln -s /opt/zookeeper/$ZK_DIST.jar /usr/share/zookeeper/ \
&& ln -s /opt/zookeeper/lib/* /usr/share/zookeeper
-RUN chmod 700 /opt/zookeeper/bin/start-zookeeper.sh
-RUN chmod 700 /var/lib/zookeeper/data/myid \ No newline at end of file
+
+RUN chown -R $ZK_USER:$ZK_USER /var/lib/zookeeper/data/myid
+RUN chown -R $ZK_USER:$ZK_USER /opt/zookeeper/bin/start-zookeeper.sh
+RUN chown -R $ZK_USER:$ZK_USER /opt/zookeeper/bin/start-metrics.sh
+RUN chown -R $ZK_USER:$ZK_USER /opt/zookeeper/bin/zookeeper-ready.sh \ No newline at end of file
diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh
index d77ec03..5222c78 100644
--- a/src/main/docker/scripts/start-zookeeper.sh
+++ b/src/main/docker/scripts/start-zookeeper.sh
@@ -116,9 +116,8 @@ function create_data_dirs() {
chown -R $ZK_USER:$ZK_USER $ZK_LOG_DIR
fi
- if [ ! -f $ID_FILE ]; then
echo $MY_ID >> $ID_FILE
- fi
+ cat $ID_FILE
echo "Created ZooKeeper data directories and set permissions in $ZK_DATA_DIR"
}