summaryrefslogtreecommitdiffstats
path: root/ms/py-executor/docker/Dockerfile
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-04-28 14:03:13 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-28 14:03:13 +0000
commit263b5c1cc1de8c9429d25e6b2aa23159f8c7ee9e (patch)
tree8846d93f613f5711c7f06cb415d284baecf35c7c /ms/py-executor/docker/Dockerfile
parent8134100d6d92a75906a55cb56b993179e97e01ec (diff)
parent0973cd1d23c2917c840cf21630d8c565732bbe1b (diff)
Merge "Making POD run as non-root" into frankfurt
Diffstat (limited to 'ms/py-executor/docker/Dockerfile')
-rw-r--r--ms/py-executor/docker/Dockerfile6
1 files changed, 5 insertions, 1 deletions
diff --git a/ms/py-executor/docker/Dockerfile b/ms/py-executor/docker/Dockerfile
index 043e15d53..bb1b0f79c 100644
--- a/ms/py-executor/docker/Dockerfile
+++ b/ms/py-executor/docker/Dockerfile
@@ -1,5 +1,7 @@
FROM python:3.7-slim
+RUN groupadd -r onap && useradd -r -g onap onap
+
RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
@@ -10,6 +12,8 @@ RUN tar -xzf /source.tar.gz -C /tmp \
RUN pip install --no-cache-dir -r /opt/app/onap/python/requirements/docker.txt
-VOLUME /opt/app/onap/blueprints/deploy/
+RUN chown onap:onap /opt -R
+VOLUME /opt/app/onap/blueprints/deploy/
+USER onap
ENTRYPOINT /opt/app/onap/python/start.sh