Merge "Add jenkins build tag for result api"
[functest.git] / docker / Dockerfile
1 ########################################
2 #   Docker container for FUNCTEST
3 ########################################
4 # Purpose: run all the tests against the POD
5 #          from a pre-installed docker image
6 #
7 # Maintained by Jose Lausuch
8 # Build:
9 #    $ docker build -t opnfv/functest:tag .
10 #
11 # Execution:
12 #    $ docker run -t -i \
13 #      -e "INSTALLER_TYPE=fuel|apex|compass|joid \
14 #      -e "INSTALLER_IP=10.20.0.2/172.30.10.73" \
15 #      -v $(pwd)/config_functest.yaml:/home/opnfv/functest/conf/config_functest.yaml
16 #      opnfv/functest /bin/bash
17 #
18 # NOTE: providing config_functest.yaml is optional. If not provided, it will
19 #       use the default one located in the repo
20 #
21 # All rights reserved. This program and the accompanying materials
22 # are made available under the terms of the Apache License, Version 2.0
23 # which accompanies this distribution, and is available at
24 # http://www.apache.org/licenses/LICENSE-2.0
25 #
26
27 FROM ubuntu:14.04
28 MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
29 LABEL version="0.1" description="OPNFV Functest Docker container"
30
31 ENV HOME /home/opnfv
32 ENV repos_dir /home/opnfv/repos
33 ENV creds /home/opnfv/functest/conf/openstack.creds
34 ENV TERM xterm
35 ENV COLORTERM gnome-terminal
36 WORKDIR /home/opnfv
37
38 # Packaged dependencies
39 RUN apt-get update && apt-get install -y \
40 ssh \
41 sshpass \
42 curl \
43 git \
44 gcc \
45 wget \
46 python-dev \
47 python-pip \
48 bundler \
49 postgresql \
50 build-essential \
51 libpq-dev \
52 libxslt-dev \
53 libssl-dev \
54 libgmp3-dev \
55 libxml2-dev \
56 libffi-dev \
57 crudini \
58 ruby1.9.1-dev \
59 --no-install-recommends
60
61
62 RUN mkdir -p ${repos_dir}
63 RUN mkdir -p /root/.ssh
64 RUN chmod 700 /root/.ssh
65
66 RUN git config --global http.sslVerify false
67 RUN git clone -b stable/brahmaputra https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest
68 RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
69 RUN git clone https://gerrit.opnfv.org/gerrit/doctor ${repos_dir}/doctor
70 RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally
71 RUN git clone https://github.com/opendaylight/integration.git ${repos_dir}/odl_integration
72 RUN git clone -b stable https://github.com/boucherv-orange/clearwater-live-test ${repos_dir}/vims-test
73 RUN git clone https://github.com/openstack/networking-bgpvpn ${repos_dir}/bgpvpn
74 RUN git clone https://gerrit.onosproject.org/OnosSystemTest  ${repos_dir}/onos
75 RUN git clone https://github.com/opnfv/promise ${repos_dir}/promise
76 RUN git clone https://gerrit.opnfv.org/gerrit/ovno ${repos_dir}/ovno
77
78 RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
79 RUN pip install -r ${repos_dir}/rally/requirements.txt
80
81 ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/opnfv/functest/data/
82
83 RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
84 RUN curl -L https://get.rvm.io | bash -s stable
85
86 RUN /bin/echo -e "set nocompatible\nset backspace=2" >> /home/opnfv/.vimrc
87 RUN echo "set nocompatible" >> /home/opnfv/.exrc
88 RUN echo "alias ll='ls -lh'" >> /home/opnfv/.bashrc