Add virtualenv to stop permission errors 71/36571/2
authorlhinds <lhinds@redhat.com>
Tue, 27 Jun 2017 11:38:19 +0000 (12:38 +0100)
committerlhinds <lhinds@redhat.com>
Tue, 27 Jun 2017 11:40:46 +0000 (12:40 +0100)
JIRA: RELENG-260

Change-Id: I55ba731441a2167063c0f7e758cc66a973da4ec9
Signed-off-by: lhinds <lhinds@redhat.com>
docker/Dockerfile

index 7a82583..424d926 100644 (file)
@@ -26,7 +26,7 @@ ENV ANTEATER_HOME ${HOME}/anteater
 # Packaged dependencies
 RUN yum -y install epel-release
 RUN yum -y update
-RUN yum -y install git python-devel python-pip
+RUN yum -y install git python-devel python-pip python-virtualenv
 RUN yum clean all
 
 # Run all following commands and container as non-root user
@@ -36,5 +36,7 @@ USER ${ANTEATER_USER}
 RUN mkdir -p ${ANTEATER_HOME}
 RUN git clone https://gerrit.opnfv.org/gerrit/releng-anteater ${ANTEATER_HOME}
 WORKDIR ${ANTEATER_HOME}
-RUN /usr/bin/pip install -r ${ANTEATER_HOME}/requirements.txt
-RUN python ${ANTEATER_HOME}/setup.py install
+RUN virtualenv ~/venv
+RUN . ~/venv/bin/activate
+RUN ~/venv/bin/pip install -r ${ANTEATER_HOME}/requirements.txt
+RUN ~/venv/bin/python ${ANTEATER_HOME}/setup.py install