From 658602b4808bd093b75adb6a151982a7b44c7f0a Mon Sep 17 00:00:00 2001 From: Sudhakar Reddy Date: Sat, 9 Mar 2019 04:26:05 +0000 Subject: Run multicloud-azure docker as non-root user Change-Id: I4e5f13a1794bf1910ed485a86fa156cb226be7c1 Issue-ID: MULTICLOUD-498 Signed-off-by: Sudhakar Reddy --- azure/docker/Dockerfile | 7 ++++++- azure/docker/build_image.sh | 0 azure/docker/docker-entrypoint.sh | 0 azure/docker/instance-config.sh | 0 azure/docker/instance-init.sh | 0 azure/docker/instance-run.sh | 0 6 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 azure/docker/build_image.sh mode change 100644 => 100755 azure/docker/docker-entrypoint.sh mode change 100644 => 100755 azure/docker/instance-config.sh mode change 100644 => 100755 azure/docker/instance-init.sh mode change 100644 => 100755 azure/docker/instance-run.sh diff --git a/azure/docker/Dockerfile b/azure/docker/Dockerfile index cc2647e..9fd35da 100644 --- a/azure/docker/Dockerfile +++ b/azure/docker/Dockerfile @@ -18,6 +18,7 @@ RUN apt-get update && \ apt-get install -y wget RUN apt-get install -y python-dev gcc libffi-dev libssl-dev make +RUN groupadd -r onap && useradd -r -g onap onap # ARIA orchestrator addition RUN pip install -U pip setuptools COPY /aria/ /tmp/ @@ -48,8 +49,12 @@ RUN cd /opt/ && \ wget -q -O multicloud-azure.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.azure&a=multicloud-azure&v=LATEST&e=zip' && \ unzip multicloud-azure.zip && \ rm -rf multicloud-azure.zip && \ - pip install -r multicloud_azure/requirements.txt + pip install -r multicloud_azure/requirements.txt && \ + chown onap:onap /opt/multicloud_azure -R + +RUN mkdir /home/onap && chown onap:onap /home/onap -R WORKDIR /opt RUN chmod +x multicloud_azure/docker/*.sh && chmod +x multicloud_azure/*.sh +USER onap ENTRYPOINT multicloud_azure/docker/docker-entrypoint.sh diff --git a/azure/docker/build_image.sh b/azure/docker/build_image.sh old mode 100644 new mode 100755 diff --git a/azure/docker/docker-entrypoint.sh b/azure/docker/docker-entrypoint.sh old mode 100644 new mode 100755 diff --git a/azure/docker/instance-config.sh b/azure/docker/instance-config.sh old mode 100644 new mode 100755 diff --git a/azure/docker/instance-init.sh b/azure/docker/instance-init.sh old mode 100644 new mode 100755 diff --git a/azure/docker/instance-run.sh b/azure/docker/instance-run.sh old mode 100644 new mode 100755 -- cgit 1.2.3-korg