Switch to absolute paths in Dockerfiles
[functest.git] / docker / restapi / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/pike
5 ARG ODL_TAG=master
6 ARG RALLY_TAG=stable/0.10
7 ARG OS_FAULTS_TAG=0.1.16
8 ARG REFSTACK_TAG=master
9 ARG FDS_TAG=master
10 ARG VIMS_TAG=stable
11
12 COPY thirdparty-requirements.txt thirdparty-requirements.txt
13 RUN apk --no-cache add --update python3 sshpass \
14         ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \
15         procps libxslt libxml2 zlib libffi go musl-dev && \
16     apk --no-cache add --virtual .build-deps --update \
17         python-dev python3-dev build-base linux-headers libffi-dev \
18         openssl-dev libjpeg-turbo-dev \
19         ruby-dev g++ make libxslt-dev libxml2-dev zlib-dev libffi-dev && \
20     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
21         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
22         > upper-constraints.txt && \
23     pip install --no-cache-dir --src /src -cupper-constraints.txt \
24         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
25         -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
26     git clone --depth 1 https://github.com/openstack/os-faults.git -b $OS_FAULTS_TAG /src/os-faults && \
27     update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
28     git clone --depth 1 https://github.com/openstack/rally.git -b $RALLY_TAG /src/rally && \
29     update-requirements -s --source /src/openstack-requirements /src/rally/ && \
30     git clone https://github.com/openstack/refstack-client.git /src/refstack-client && \
31     (cd /src/refstack-client && git checkout $REFSTACK_TAG) && \
32     update-requirements -s --source /src/openstack-requirements /src/refstack-client/ && \
33     pip install --no-cache-dir --src /src -cupper-constraints.txt \
34         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
35         tempest /src/os-faults && \
36     pip install --no-cache-dir --src /src -cupper-constraints.txt \
37         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
38         -e/src/refstack-client /src/rally -rthirdparty-requirements.txt && \
39     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \
40         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
41         doctor-tests && \
42     git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
43     (cd /src/odl_test && git checkout $ODL_TAG) && \
44     git clone --depth 1 -b $FDS_TAG https://gerrit.opnfv.org/gerrit/fds /src/fds && \
45     git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \
46     ln -s /src/tempest /src/refstack-client/.tempest && \
47     virtualenv --system-site-packages /src/tempest/.venv --python=python2.7 && \
48     git clone https://github.com/RebacaInc/abot_charm.git /src/epc-requirements/abot_charm && \
49     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \
50         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
51         juju-wait && \
52     go get github.com/rogpeppe/godeps && \
53     (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
54     rm -r upper-constraints.txt thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
55         /src/os-faults /src/rally /src/fds/.git /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \
56     mkdir -p /etc/rally && \
57     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
58     mkdir -p /var/lib/rally/database && rally db create && \
59     apk del .build-deps
60 EXPOSE 5000
61 CMD ["functest_restapi"]