Merge "Fix report generation"
[yardstick.git] / ansible / roles / create_dockerfile / templates / centos / Dockerfile
1 ##############################################################################
2 # Copyright (c) 2017 Intel Corporation
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 FROM centos:7.3.1611
11
12 LABEL image=opnfv/yardstick
13
14 ARG BRANCH=master
15
16 # GIT repo directory
17 ENV REPOS_DIR /home/opnfv/repos
18
19 # Yardstick repo
20 ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick
21
22 RUN yum -y install\
23     deltarpm \
24     wget \
25     expect \
26     curl \
27     git \
28     sshpass \
29     ansible \
30     qemu-kvm \
31     qemu-utils \
32     kpartx \
33     libffi-devel \
34     openssl-devel \
35     zeromq2-devel \
36     python \
37     python-devel \
38     libxml2-devel \
39     libxslt-devel \
40     nginx \
41     uwsgi \
42     uwsgi-plugin-python \
43     supervisor \
44     ansible \
45     python-setuptools && \
46     easy_install -U setuptools==30.0.0 && \
47     yum clean all
48
49 RUN mkdir -p ${REPOS_DIR} && \
50     git config --global http.sslVerify false && \
51     git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}  && \
52
53 # install yardstick + dependencies
54 # explicity pin pip version to avoid future issues like the ill-fated pip 8.0.0 release
55 RUN easy_install -U "pip==${PIP_VERSION}" && \
56     pip install -r ${YARDSTICK_REPO_DIR}/requirements.txt && \
57     pip install ${YARDSTICK_REPO_DIR}
58
59 RUN ${YARDSTICK_REPO_DIR}/api/api-prepare.sh
60
61 EXPOSE 5000
62
63 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img /home/opnfv/images/
64 ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img /home/opnfv/images/
65
66 COPY ./exec_tests.sh /usr/local/bin/
67 CMD ["/usr/bin/supervisord"]