summaryrefslogtreecommitdiffstats
path: root/testapi/docker/Dockerfile
diff options
context:
space:
mode:
authormorganrol <morgan.richomme@orange.com>2021-03-30 07:50:38 +0200
committermorganrol <morgan.richomme@orange.com>2021-03-30 07:54:23 +0200
commitc90c2d4c2c05d119707ce566c9bb2312386d5a40 (patch)
treeed692af9bee46e99efd9c3eecd98c5b16a981722 /testapi/docker/Dockerfile
parent3d34da1191fabc6974ecbe170c09909578adffa4 (diff)
[TESTAPI] Add chown to allow start in openshift
Some files of the testapi are located in system directories - /etc/opnfv_testapi - /usr/local/share/opnfv_testapi it requires some root priviledge to execute them properly especially in an openshift environment this patch force the user right for these directories another option could be to move these files in home directory but so fare we are just changing the dockerization and did not modify the code of the API. Signed-off-by: morganrol <morgan.richomme@orange.com> Change-Id: I7f9607f31e97d3bf8462ebe07fad0714aac47bdd
Diffstat (limited to 'testapi/docker/Dockerfile')
-rw-r--r--testapi/docker/Dockerfile4
1 files changed, 4 insertions, 0 deletions
diff --git a/testapi/docker/Dockerfile b/testapi/docker/Dockerfile
index d4446b3..651e8e0 100644
--- a/testapi/docker/Dockerfile
+++ b/testapi/docker/Dockerfile
@@ -36,6 +36,10 @@ RUN apt-get update && apt-get install -y \
groupadd -r $group && useradd -ms /bin/bash $user -g $group && \
mkdir -p /home/ubuntu/releng-testresults && \
chown -R $user:$group /home/ubuntu/releng-testresults && \
+ mkdir -p /etc/opnfv_testapi && \
+ chown -R $user:$group /etc/opnfv_testapi && \
+ mkdir -p /usr/local/share/opnfv_testapi && \
+ chown -R $user:$group /usr/local/share/opnfv_testapi && \
git clone https://gerrit.opnfv.org/gerrit/releng-testresults \
/home/ubuntu/releng-testresults && \
pip install -r /home/ubuntu/releng-testresults/testapi/requirements.txt \