From ff8244a97ee52fb667c5dd78ae256b2d13795d98 Mon Sep 17 00:00:00 2001 From: "sunil.unnava" Date: Tue, 9 Apr 2019 00:44:47 -0400 Subject: run as non root user Issue-ID: DMAAP-1040 Change-Id: I8b51a2e32113f115b11004c0bccf827329026065 Signed-off-by: sunil.unnava --- src/main/docker/Dockerfile | 8 ++++---- src/main/docker/scripts/start-zookeeper.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main') diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index f21b236..1140464 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -51,9 +51,9 @@ RUN chmod -R 777 /opt/zookeeper/bin ENTRYPOINT /opt/zookeeper/bin/start-zookeeper.sh EXPOSE 2181 2888 3888 -RUN addgroup onap \ - && adduser mrzookeeper -ingroup onap \ - && chown -R mrzookeeper:onap /opt/$ZK_DIST/ /opt/zookeeper/ /var/lib/ /var/log/ /tmp/zookeeper/ +RUN addgroup 2000 \ + && adduser 1000 -ingroup 2000 \ + && chown -R 1000:2000 /opt/$ZK_DIST/ /opt/zookeeper/ /var/lib/ /var/log/ /tmp/zookeeper/ -USER mrzookeeper +USER 1000 diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh index e2f3f09..19ae316 100644 --- a/src/main/docker/scripts/start-zookeeper.sh +++ b/src/main/docker/scripts/start-zookeeper.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash ZK_REPLICAS=${ZK_REPLICAS:-1} -ZK_USER=${ZK_USER:-"root"} +ZK_USER=${ZK_USER:-"1000"} ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"} ZK_DATA_DIR=${ZK_DATA_DIR:-"/var/lib/zookeeper/data"} ZK_DATA_LOG_DIR=${ZK_DATA_LOG_DIR:-"/var/lib/zookeeper/data"} -- cgit 1.2.3-korg