Merge "test_vnf_generic: fix unitests when files are present"
[yardstick.git] / docker / Dockerfile
index 5387bab..afb2ce5 100644 (file)
@@ -11,6 +11,8 @@ FROM ubuntu:14.04
 
 LABEL image=opnfv/yardstick
 
+ARG BRANCH=master
+
 # GIT repo directory
 ENV REPOS_DIR /home/opnfv/repos
 
@@ -39,12 +41,17 @@ RUN apt-get update && apt-get install -y \
     kpartx \
     libffi-dev \
     libssl-dev \
+    libzmq-dev \
     python \
     python-dev \
     libxml2-dev \
     libxslt1-dev \
+    nginx \
+    uwsgi \
+    uwsgi-plugin-python \
+    supervisor \
     python-setuptools && \
-    easy_install -U setuptools
+    easy_install -U setuptools==30.0.0
 
 RUN apt-get -y autoremove && \
     apt-get clean
@@ -52,15 +59,20 @@ RUN apt-get -y autoremove && \
 RUN mkdir -p ${REPOS_DIR}
 
 RUN git config --global http.sslVerify false
-RUN git clone https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
-RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
+RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
+RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
 
 # install yardstick + dependencies
 RUN cd ${YARDSTICK_REPO_DIR} && easy_install -U pip
-RUN cd ${YARDSTICK_REPO_DIR} && pip install -r tests/ci/requirements.txt
+RUN cd ${YARDSTICK_REPO_DIR} && pip install -r requirements.txt
 RUN cd ${YARDSTICK_REPO_DIR} && pip install .
 
+RUN ${YARDSTICK_REPO_DIR}/api/api-prepare.sh
+
+EXPOSE 5000
+
 ADD http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img /home/opnfv/images/
 ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img /home/opnfv/images/
 
 COPY ./exec_tests.sh /usr/local/bin/
+CMD ["/usr/bin/supervisord"]