Add packages in docker alpine containers
[functest.git] / docker / restapi / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/ocata
5 ARG ODL_TAG=35e415b6873b39d72775c88a337e92dac26012e2
6 ARG FDS_TAG=master
7 ARG REFSTACK_TAG=4e187b07672dd1c41cb7c94658f1c91edebf53a2
8 ARG VIMS_TAG=stable
9
10 COPY thirdparty-requirements.txt thirdparty-requirements.txt
11 RUN apk --no-cache add --update nodejs nodejs-npm python3 sshpass \
12         ruby ruby-dev ruby-bundler ruby-irb ruby-rdoc dnsmasq \
13         procps git g++ make libxslt-dev libxml2-dev zlib-dev libffi-dev && \
14     apk --no-cache add --virtual .build-deps --update \
15         python-dev build-base linux-headers libffi-dev \
16         openssl-dev libjpeg-turbo-dev git && \
17     git clone --depth 1 https://github.com/openstack/refstack-client.git /src/refstack-client && \
18     (cd src/refstack-client && git checkout -b $REFSTACK_TAG) && \
19     update-requirements -s --source /src/openstack-requirements /src/refstack-client/ && \
20     pip install --no-cache-dir --src /src \
21         -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
22         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
23         -e/src/refstack-client -rthirdparty-requirements.txt && \
24     git clone --depth 1 https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
25     (cd src/odl_test && git checkout -b $ODL_TAG) && \
26     git clone --depth 1 -b $FDS_TAG https://gerrit.opnfv.org/gerrit/fds /src/fds && \
27     git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \
28     ln -s /src/tempest /src/refstack-client/.tempest && \
29     virtualenv --system-site-packages /src/tempest/.venv && \
30     (cd /src/promise/source && npm install) && \
31     (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
32     npm -g install npm@latest && \
33     rm -r thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
34         /src/fds/.git /src/vims-test/.git && \
35     apk del .build-deps
36 EXPOSE 5000
37 CMD ["functest_restapi"]