From c90c2d4c2c05d119707ce566c9bb2312386d5a40 Mon Sep 17 00:00:00 2001 From: morganrol Date: Tue, 30 Mar 2021 07:50:38 +0200 Subject: [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 Change-Id: I7f9607f31e97d3bf8462ebe07fad0714aac47bdd --- testapi/docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testapi/docker/Dockerfile') 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 \ -- cgit 1.2.3-korg