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 # need to put distro in a yum vars file. learned that here:
31 # https://review.openstack.org/#/c/568180/2//COMMIT_MSG
32 RUN echo "centos" > /etc/yum/vars/contentdir
33 RUN yum install -y epel-release centos-release-openstack-queens && yum update -y
34
35 RUN yum install -y \
36     automake \
37     autoconf \
38     git \
39     libconfig-devel \
40     libffi-devel \
41     libpcap-devel \
42     libtool \
43     make \
44     net-snmp-devel \
45     python-devel \
46     python-openstackclient \
47     python-pip \
48     python-setuptools \
49     wget
50
51 RUN pip install \
52     docker-py \
53     importlib \
54     ipaddr \
55     jmespath \
56     jsonpath-rw \
57     netifaces \
58     netaddr \
59     requests \
60     robotframework{,-{httplibrary,requests,sshlibrary==3.1.1,selenium2library}} \
61     scapy \
62     setuptools
63
64 RUN git config --global http.sslVerify false
65
66 # Clone ODL Int/Test, ODL RelEng and OPNFV CPerf repos
67 ENV CPERF_REPO_DIR ${REPOS_DIR}/cperf
68 ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
69 ENV ODL_TEST_REPO_DIR ${REPOS_DIR}/odl_test
70 RUN git clone https://gerrit.opnfv.org/gerrit/cperf ${CPERF_REPO_DIR}
71 RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
72 RUN git clone https://git.opendaylight.org/gerrit/p/integration/test ${ODL_TEST_REPO_DIR}
73
74 # Clone and build CBench
75 ENV OF_DIR ${REPOS_DIR}/openflow
76 ENV OFLOPS_DIR ${REPOS_DIR}/oflops
77 RUN git clone https://github.com/mininet/openflow.git ${OF_DIR}
78 RUN git clone https://github.com/mininet/oflops.git ${OFLOPS_DIR}
79 RUN cd ${OFLOPS_DIR} && ./boot.sh && ./configure --with-openflow-src-dir=${OF_DIR} && make && make install