99d18cade5210543d96bb272a52ff03df6a950d9
[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/foreman" \
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
22 FROM ubuntu:14.04
23 MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
24 LABEL version="0.1" description="OPNFV Functest Docker container"
25
26 ENV HOME /home/opnfv
27 ENV repos_dir /home/opnfv/repos
28 ENV creds /home/opnfv/functest/conf/openstack.creds
29 WORKDIR /home/opnfv
30
31 # Packaged dependencies
32 RUN apt-get update && apt-get install -y \
33 ssh \
34 sshpass \
35 curl \
36 git \
37 gcc \
38 wget \
39 python-dev \
40 python-pip \
41 bundler \
42 postgresql \
43 build-essential \
44 libpq-dev \
45 libxslt-dev \
46 libssl-dev \
47 libgmp3-dev \
48 libxml2-dev \
49 libffi-dev \
50 crudini \
51 --no-install-recommends
52
53
54 RUN mkdir -p ${repos_dir}
55 RUN mkdir -p /root/.ssh
56 RUN chmod 700 /root/.ssh
57
58 RUN git config --global http.sslVerify false
59 RUN git clone https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest
60 RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
61 RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally
62 RUN git clone https://github.com/opendaylight/integration.git ${repos_dir}/odl_integration
63 RUN git clone -b stable https://github.com/boucherv-orange/clearwater-live-test ${repos_dir}/vims-test
64 RUN git clone https://github.com/openstack/networking-bgpvpn ${repos_dir}/bgpvpn
65
66 RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
67
68 RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
69 RUN curl -L https://get.rvm.io | bash -s stable
70 RUN bash -c 'source /etc/profile.d/rvm.sh ; rvm autolibs enable ; rvm install 1.9.3 ; rvm use 1.9.3'
71 RUN bash -c 'source /etc/profile.d/rvm.sh ; cd ${repos_dir}/vims-test ; bundle install'
72
73 ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/opnfv/functest/data/