summaryrefslogtreecommitdiffstats
path: root/src/main/docker
diff options
context:
space:
mode:
authorsunil unnava <sunil.unnava@att.com>2018-11-21 17:07:59 -0500
committersunil unnava <sunil.unnava@att.com>2018-11-21 17:08:17 -0500
commit08b5ab8aaab4782cf0ef924010f457a2dfc383b0 (patch)
tree90c5bb5acc4f0e5ac888e79ab494f4a572a5d6ac /src/main/docker
parent97d04ee738fca52d34b83a144a13dbeb1d1820c1 (diff)
remove the unnecessary code
Issue-ID: DMAAP-888 Change-Id: I8264df87c8dda093e121aaef38aa68262ec74cd5 Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main/docker')
-rw-r--r--src/main/docker/Dockerfile15
-rw-r--r--src/main/docker/scripts/start-zookeeper5
2 files changed, 2 insertions, 18 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index 2d271e4..eea222a 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -37,17 +37,4 @@ RUN set -x \
#Copy configuration generator script to bin
-COPY scripts /opt/zookeeper/bin/
-
-# Create a user for the zookeeper process and configure file system ownership
-# for nessecary directories and symlink the distribution as a user executable
-RUN set -x \
- && useradd $ZK_USER \
- && [ `id -u $ZK_USER` -eq 1000 ] \
- && [ `id -g $ZK_USER` -eq 1000 ] \
- && mkdir -p $ZK_DATA_DIR $ZK_DATA_LOG_DIR $ZK_LOG_DIR /usr/share/zookeeper /tmp/zookeeper /usr/etc/ \
- && chown -R "$ZK_USER:$ZK_USER" /opt/$ZK_DIST $ZK_DATA_DIR $ZK_LOG_DIR $ZK_DATA_LOG_DIR /tmp/zookeeper \
- && ln -s /opt/zookeeper/conf/ /usr/etc/zookeeper \
- && ln -s /opt/zookeeper/bin/* /usr/bin \
- && ln -s /opt/zookeeper/$ZK_DIST.jar /usr/share/zookeeper/ \
- && ln -s /opt/zookeeper/lib/* /usr/share/zookeeper
+COPY scripts /opt/zookeeper/bin/ \ No newline at end of file
diff --git a/src/main/docker/scripts/start-zookeeper b/src/main/docker/scripts/start-zookeeper
index 25fe466..d3429be 100644
--- a/src/main/docker/scripts/start-zookeeper
+++ b/src/main/docker/scripts/start-zookeeper
@@ -1,4 +1,3 @@
-USER=`whoami`
HOST=`hostname -s`
DOMAIN=`hostname -d`
LOG_LEVEL=INFO
@@ -87,18 +86,16 @@ Starts a ZooKeeper server based on the supplied options.
function create_data_dirs() {
if [ ! -d $DATA_DIR ]; then
mkdir -p $DATA_DIR
- chown -R $USER:$USER $DATA_DIR
fi
if [ ! -d $DATA_LOG_DIR ]; then
mkdir -p $DATA_LOG_DIR
- chown -R $USER:USER $DATA_LOG_DIR
fi
if [ ! -d $LOG_DIR ]; then
mkdir -p $LOG_DIR
- chown -R $USER:$USER $LOG_DIR
fi
+
if [ ! -f $ID_FILE ] && [ $SERVERS -gt 1 ]; then
echo $MY_ID >> $ID_FILE
fi