From 4385e43213ce46c258f69d1a5b2cc13ca192fb90 Mon Sep 17 00:00:00 2001 From: morganrol Date: Sun, 28 Mar 2021 23:20:18 +0200 Subject: [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 Change-Id: I37c8262d1ec20151e2402e298751ca39c36d1a7e --- testapi/docker/Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'testapi/docker/Dockerfile') 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 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 -- cgit 1.2.3-korg