From d880bc87d826ddded5e48bb5b78e0024762a5ad7 Mon Sep 17 00:00:00 2001 From: Haibin Huang Date: Fri, 22 Feb 2019 15:24:21 +0800 Subject: Run Starlingx plugin as non root user Change-Id: Icb45c00205948399010662783e6268402df77e10 Issue-ID: MULTICLOUD-500 Signed-off-by: Haibin Huang --- starlingx/docker/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'starlingx/docker/Dockerfile') diff --git a/starlingx/docker/Dockerfile b/starlingx/docker/Dockerfile index 49da0aba..be9928c7 100644 --- a/starlingx/docker/Dockerfile +++ b/starlingx/docker/Dockerfile @@ -31,6 +31,7 @@ ENV AAI_PASSWORD "AAI" EXPOSE 9009 +RUN groupadd -r onap && useradd -r -g onap onap WORKDIR /opt/starlingx RUN apt-get update && apt-get install -y memcached unzip RUN wget -O /opt/multicloud-openstack-starlingx.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack&a=multicloud-openstack-starlingx&e=zip&v=1.3.0-SNAPSHOT" && \ @@ -38,6 +39,9 @@ RUN wget -O /opt/multicloud-openstack-starlingx.zip "https://nexus.onap.org/serv rm -f /opt/multicloud-openstack-starlingx.zip RUN mkdir -p /var/log/onap/multicloud/openstack/starlingx/ #COPY ./ . -RUN pip install -r requirements.txt +RUN pip install -r requirements.txt && +RUN chown onap:onap /opt/stalingx -R + +USER onap CMD "/opt/starlingx/run.sh" -- cgit 1.2.3-korg