diff options
author | morganrol <morgan.richomme@orange.com> | 2021-03-28 23:20:18 +0200 |
---|---|---|
committer | morganrol <morgan.richomme@orange.com> | 2021-03-28 23:20:18 +0200 |
commit | 4385e43213ce46c258f69d1a5b2cc13ca192fb90 (patch) | |
tree | a76cef30c50fa78a06d521cd97a348560b822e62 /testapi/docker/Dockerfile | |
parent | 70737dc32a5bfca180dafc05f7b6ba41a5fb42fc (diff) |
[TESTAPI] Upgrade the docker without changing the python2.7 code
migratio to python 3 is not a long flmeuve tranquille
some libraries used are no more maintained
this option considers updating the dockerfile without changing the
original code
it includes
- a change of the baseline image (move from 14.04 to 18.04)
- a better fix of python lib versions
- the introduction of an ubuntu user (to be better used)
Issue-ID: FUNCTEST-1026
Signed-off-by: morganrol <morgan.richomme@orange.com>
Change-Id: I37c8262d1ec20151e2402e298751ca39c36d1a7e
Diffstat (limited to 'testapi/docker/Dockerfile')
-rw-r--r-- | testapi/docker/Dockerfile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/testapi/docker/Dockerfile b/testapi/docker/Dockerfile index 9c8115f..4b88dfc 100644 --- a/testapi/docker/Dockerfile +++ b/testapi/docker/Dockerfile @@ -23,12 +23,15 @@ # http://www.apache.org/licenses/LICENSE-2.0 # -FROM ubuntu:14.04 +FROM ubuntu:18.04 MAINTAINER SerenaFeng <feng.xiaowei@zte.com.cn> LABEL version="v1" description="OPNFV TestAPI Docker container" ENV HOME /home +ARG user=ubuntu +ARG group=ubuntu + # Packaged dependencies RUN apt-get update && apt-get install -y \ curl \ @@ -37,6 +40,7 @@ gcc \ wget \ python-dev \ python-pip \ +python-setuptools \ crudini \ libxslt-dev \ zlib1g-dev \ @@ -44,10 +48,14 @@ zlib1g-dev \ RUN pip install --upgrade requests +RUN groupadd -r $group && useradd -ms /bin/bash $user -g $group && \ + mkdir -p /home/ubuntu/releng-testresults && \ + chown -R $user:$group /home/ubuntu/releng-testresults + RUN git config --global http.sslVerify false -RUN git clone https://gerrit.opnfv.org/gerrit/releng-testresults /home/releng-testresults -WORKDIR /home/releng-testresults/testapi +RUN git clone https://gerrit.opnfv.org/gerrit/releng-testresults /home/ubuntu/releng-testresults +WORKDIR /home/ubuntu/releng-testresults/testapi RUN pip install -r requirements.txt # bugfix |