From e2d379be0f177196553da53c78561433abb28ef5 Mon Sep 17 00:00:00 2001
From: jananib <janani.b@huawei.com>
Date: Thu, 23 Apr 2020 19:28:43 +0530
Subject: Making POD run as non-root

Non-root user addition

Change-Id: Id110aebea3d3526aaf319d8994670644a7bab698
Issue-ID: CCSDK-2149
Signed-off-by: jananib <janani.b@huawei.com>
(cherry picked from commit be864c3d32ea9dfe88f0e121734abdc950401449)
---
 ms/command-executor/src/main/docker/Dockerfile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'ms/command-executor/src')

diff --git a/ms/command-executor/src/main/docker/Dockerfile b/ms/command-executor/src/main/docker/Dockerfile
index c38126066..e91265b56 100644
--- a/ms/command-executor/src/main/docker/Dockerfile
+++ b/ms/command-executor/src/main/docker/Dockerfile
@@ -11,7 +11,6 @@ COPY start.sh /opt/app/onap/start.sh
 RUN chmod u+x /opt/app/onap/start.sh
 
 RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
-RUN chown onap:onap /opt -R
 
 COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
 RUN tar -xzf /source.tar.gz -C /tmp \
@@ -19,6 +18,9 @@ RUN tar -xzf /source.tar.gz -C /tmp \
  && rm -rf /source.tar.gz \
  && rm -rf /tmp/@project.build.finalName@
 
+RUN mkdir -p /opt/app/onap/blueprints/deploy
+RUN chown onap:onap /opt -R
+
 VOLUME /opt/app/onap/blueprints/deploy/
 USER onap
 ENTRYPOINT /opt/app/onap/start.sh
-- 
cgit 1.2.3-korg