aboutsummaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorlhinds <lhinds@redhat.com>2017-06-27 12:38:19 +0100
committerlhinds <lhinds@redhat.com>2017-06-27 12:40:46 +0100
commitb044e0f17700ae3f7621734daf5c4e502b362dde (patch)
treec6c2e2316fb2d7dd0cbd80ab24f75868f006b097 /docker/Dockerfile
parent5ab9c733f380b2a327e64fcfa760d28639994982 (diff)
Add virtualenv to stop permission errors
JIRA: RELENG-260 Change-Id: I55ba731441a2167063c0f7e758cc66a973da4ec9 Signed-off-by: lhinds <lhinds@redhat.com>
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile8
1 files changed, 5 insertions, 3 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 7a82583..424d926 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -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