summaryrefslogtreecommitdiffstats
path: root/ocata/docker/Dockerfile
diff options
context:
space:
mode:
authorHaibin Huang <haibin.huang@intel.com>2019-02-26 09:05:13 +0800
committerHaibin Huang <haibin.huang@intel.com>2019-02-26 13:55:00 +0800
commit6eedde85e963dee1e12c1199c9e94300bb827318 (patch)
tree268b12d4da5fe67dfa45db3270f1e720337114f6 /ocata/docker/Dockerfile
parent38896883244c4a0145e4afb0ad76dc62123d5293 (diff)
Run Ocata plugin as non root user
Change-Id: Ia4e201ee586cc62f1ea2f5f38d4001acc7ccc0b5 Issue-ID: MULTICLOUD-500 Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Diffstat (limited to 'ocata/docker/Dockerfile')
-rw-r--r--ocata/docker/Dockerfile7
1 files changed, 6 insertions, 1 deletions
diff --git a/ocata/docker/Dockerfile b/ocata/docker/Dockerfile
index e6525335..bff5706a 100644
--- a/ocata/docker/Dockerfile
+++ b/ocata/docker/Dockerfile
@@ -31,13 +31,18 @@ ENV AAI_PASSWORD "AAI"
EXPOSE 9006
+RUN groupadd -r onap && useradd -r -g onap onap
+
WORKDIR /opt/ocata
-RUN apt-get update && apt-get install -y memcached unzip rabbitmq-server
+RUN apt-get update && apt-get install -y memcached unzip
RUN wget -O /opt/multicloud-openstack-ocata.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack&a=multicloud-openstack-ocata&e=zip&v=1.3.0-SNAPSHOT" && \
unzip -q -o -B /opt/multicloud-openstack-ocata.zip -d /opt/ && \
rm -f /opt/multicloud-openstack-ocata.zip
RUN mkdir -p /var/log/onap/multicloud/openstack/ocata/
#COPY ./ .
RUN pip install -r requirements.txt
+RUN chown onap:onap /opt/ocata -R
+
+USER onap
CMD "/opt/ocata/run.sh"