summaryrefslogtreecommitdiffstats
path: root/vio/docker/Dockerfile
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2019-02-21 16:04:03 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2019-02-21 16:17:02 +0800
commit731dc6db54f4b77606f37512006af429e791d5e4 (patch)
treeb3929e7fa3001a4428c6c507324d15356a20232d /vio/docker/Dockerfile
parent4023da169cdfa91674b06d6dcbc9d703480b8d8b (diff)
Use non-root user in docker image
Create onap user for vio plugin Change-Id: Idaf3edcf6cb411f462bb8b7d34b091125605abae Issue-ID: MULTICLOUD-497 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio/docker/Dockerfile')
-rw-r--r--vio/docker/Dockerfile8
1 files changed, 6 insertions, 2 deletions
diff --git a/vio/docker/Dockerfile b/vio/docker/Dockerfile
index b5289e6..6cd1361 100644
--- a/vio/docker/Dockerfile
+++ b/vio/docker/Dockerfile
@@ -18,13 +18,17 @@ RUN apt-get update && \
apt-get install -y wget && \
apt-get install -y redis-server
+RUN groupadd -r onap && useradd -r -g onap onap
RUN cd /opt/ && \
wget -q -O multicloud-vio.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=multicloud-openstack-vmware&v=1.3.0-SNAPSHOT&e=zip' && \
unzip multicloud-vio.zip && \
rm -rf multicloud-vio.zip && \
- pip install -r vio/requirements.txt
+ pip install -r vio/requirements.txt && \
+ chown onap:onap -R vio/
+USER onap
WORKDIR /opt
-ENTRYPOINT vio/docker/docker-entrypoint.sh
+# ENTRYPOINT vio/docker/docker-entrypoint.sh
+CMD ["/bin/sh", "-c", "/opt/vio/run.sh"]