diff options
author | krishnaa96 <krishna.moorthy6@wipro.com> | 2020-09-10 10:16:14 +0530 |
---|---|---|
committer | krishnaa96 <krishna.moorthy6@wipro.com> | 2020-09-10 10:16:14 +0530 |
commit | 5d34c1658166022fa363c5a3b7d86ca15534fa38 (patch) | |
tree | cd51bd49704231f335e4f72b91b650f47b9657dd /cmso-robot/docker/Dockerfile | |
parent | b484b6374bf294b37e27991357ca641b175665a7 (diff) |
Add non-root user to cmso-robot
Issue-ID: OPTFRA-838
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: Idf960b4a80f37f4fc4ed542a586958509e42e0ff
Diffstat (limited to 'cmso-robot/docker/Dockerfile')
-rw-r--r-- | cmso-robot/docker/Dockerfile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cmso-robot/docker/Dockerfile b/cmso-robot/docker/Dockerfile index c91692c..e46c140 100644 --- a/cmso-robot/docker/Dockerfile +++ b/cmso-robot/docker/Dockerfile @@ -27,8 +27,10 @@ apt-get install \ chromium-chromedriver \ dnsutils \ git \ - gcc - + gcc + +RUN groupadd onap \ + && useradd -m -g onap onap COPY /onap-cmso/robot /opt/cmso-robot/robot COPY /onap-cmso/mocking /opt/cmso-robot/mocking @@ -45,7 +47,11 @@ RUN ln -s /usr/bin/python3.6 /usr/bin/python && \ pip install robotframework-sshlibrary && \ pip install robotframework-requests -### Start up the mock server for +RUN chown -R onap:onap /opt/cmso-robot + +USER onap + +### Start up the mock server for CMD ["/usr/bin/python", "/opt/cmso-robot/mocking/mock.py"] ### Use --entrypoint to override to run the tests test and exit |