Update Functest to OpenStack stable/pike
[functest.git] / docker / core / Dockerfile
1 FROM alpine:3.6
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/pike
5 ARG RALLY_TAG=stable/0.10
6 ARG OS_FAULTS_TAG=0.1.16
7
8 RUN apk --no-cache add --update \
9         python libffi libssl1.0 libjpeg-turbo py-pip bash \
10         grep sed wget ca-certificates git openssh-client && \
11     apk --no-cache add --virtual .build-deps --update \
12         python-dev build-base linux-headers libffi-dev \
13         openssl-dev libjpeg-turbo-dev && \
14     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
15         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ | \
16         > upper-constraints.txt && \
17     pip install --no-cache-dir --src /src -cupper-constraints.txt \
18         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
19         -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
20     git clone --depth 1 https://github.com/openstack/os-faults.git -b $OS_FAULTS_TAG /src/os-faults && \
21     update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
22     git clone --depth 1 https://github.com/openstack/rally.git -b $RALLY_TAG /src/rally && \
23     update-requirements -s --source /src/openstack-requirements /src/rally/ && \
24     pip install --no-cache-dir --src /src -cupper-constraints.txt \
25         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
26          /src/os-faults /src/rally && \
27     pip install --no-cache-dir --src /src -cupper-constraints.txt \
28         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
29         git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest && \
30     rm -r upper-constraints.txt /src/os-faults/.git /src/rally/.git && \
31     mkdir -p /etc/rally && \
32     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
33     mkdir -p /var/lib/rally/database && rally-manage db create && \
34     bash -c "mkdir -p /home/opnfv/functest{/conf,/data,/images,/results} /home/opnfv/repos/vnfs" && \
35     apk del .build-deps