Pin sshlibrary to 3.1.1
[cperf.git] / docker / Dockerfile
1 ##############################################################################
2 # Docker container for CPerf's test tools.
3 ##############################################################################
4 #
5 # To build (from the directory that contains this Dockerfile):
6 #   $ docker build -t opnfv/cperf .
7 #
8 # To run:
9 #   $ docker run -it opnfv/cperf ${pybot_command}
10 #
11 # Pass the full pybot test command as ${pybot_command}.
12 #
13 # Copyright (c) 2016 Red Hat Inc.
14 # Jamo Luhrsen <jluhrsen@redhat.com>
15 # All rights reserved. This program and the accompanying materials
16 # are made available under the terms of the Apache License, Version 2.0
17 # which accompanies this distribution, and is available at
18 # http://www.apache.org/licenses/LICENSE-2.0
19 #############################################################################
20
21 FROM centos:7
22 MAINTAINER Jamo Luhrsen <jluhrsen@redhat.com>
23
24 ARG BRANCH=master
25
26 ENV HOME /home/opnfv
27 ENV REPOS_DIR /home/opnfv/repos
28 RUN mkdir -p ${REPOS_DIR}
29
30 RUN yum install -y epel-release centos-release-openstack-ocata && yum update -y
31
32 RUN yum install -y \
33     automake \
34     autoconf \
35     git \
36     libconfig-devel \
37     libffi-devel \
38     libpcap-devel \
39     libtool \
40     make \
41     net-snmp-devel \
42     python-devel \
43     python-openstackclient \
44     python-pip \
45     python-setuptools \
46     wget
47
48 RUN pip install \
49     docker-py \
50     importlib \
51     ipaddr \
52     jmespath \
53     jsonpath-rw \
54     netifaces \
55     netaddr \
56     requests \
57     robotframework{,-{httplibrary,requests,sshlibrary,selenium2library}} \
58     scapy \
59     setuptools
60
61 RUN git config --global http.sslVerify false
62
63 # Clone ODL Int/Test, ODL RelEng and OPNFV CPerf repos
64 ENV CPERF_REPO_DIR ${REPOS_DIR}/cperf
65 ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
66 ENV ODL_TEST_REPO_DIR ${REPOS_DIR}/odl_test
67 RUN git clone https://gerrit.opnfv.org/gerrit/cperf ${CPERF_REPO_DIR}
68 RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
69 RUN git clone https://git.opendaylight.org/gerrit/p/integration/test ${ODL_TEST_REPO_DIR}
70
71 # Clone and build CBench
72 ENV OF_DIR ${REPOS_DIR}/openflow
73 ENV OFLOPS_DIR ${REPOS_DIR}/oflops
74 RUN git clone git://gitosis.stanford.edu/openflow.git ${OF_DIR}
75 RUN git clone https://github.com/andi-bigswitch/oflops.git ${OFLOPS_DIR}
76 RUN cd ${OFLOPS_DIR} && ./boot.sh && ./configure --with-openflow-src-dir=${OF_DIR} && make && make install