remove the unnecessary code 99/73299/1
authorsunil unnava <sunil.unnava@att.com>
Wed, 21 Nov 2018 22:07:59 +0000 (17:07 -0500)
committersunil unnava <sunil.unnava@att.com>
Wed, 21 Nov 2018 22:08:17 +0000 (17:08 -0500)
Issue-ID: DMAAP-888
Change-Id: I8264df87c8dda093e121aaef38aa68262ec74cd5
Signed-off-by: sunil unnava <sunil.unnava@att.com>
src/main/docker/Dockerfile
src/main/docker/scripts/start-zookeeper

index 2d271e4..eea222a 100644 (file)
@@ -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
index 25fe466..d3429be 100644 (file)
@@ -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