blob: 20598c7fa75a3e82465b05214a5134e9d4449f81 [file] [log] [blame]
Moshe0bb532c2018-02-26 13:39:57 +02001##############################################################################
2# Copyright 2018 EuropeanSoftwareMarketingLtd.
3# ===================================================================
4# Licensed under the ApacheLicense, Version2.0 (the"License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# software distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and limitations under
12# the License
13##############################################################################
14# vnftest comment: this is a modified copy of
15# yardstick/docker/Dockerfile
16FROM ubuntu:16.04
17
18LABEL image=onap/vnftest
19
20ARG BRANCH=master
21
22# GIT repo directory
23ENV REPOS_DIR="/home/onap/repos" \
24 IMAGE_DIR="/home/onap/images/"
25
26# Set work directory
27
28# Vnftest repo
29ENV VNFTEST_REPO_DIR="${REPOS_DIR}/vnftest" \
30 RELENG_REPO_DIR="${REPOS_DIR}/releng" \
31 STORPERF_REPO_DIR="${REPOS_DIR}/storperf"
32
33RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean
34RUN easy_install -U setuptools==30.0.0
35RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0
36
37RUN mkdir -p ${REPOS_DIR}
38
39RUN git config --global http.sslVerify false
40RUN git clone --depth 1 -b $BRANCH https://gerrit.onap.org/r/vnfsdk/dovetail-integration ${VNFTEST_REPO_DIR}
41
42WORKDIR ${VNFTEST_REPO_DIR}
43RUN ${VNFTEST_REPO_DIR}/install.sh
44RUN ${VNFTEST_REPO_DIR}/docker/supervisor.sh
45
46RUN echo "daemon off;" >> /etc/nginx/nginx.conf
47
48EXPOSE 6000
49
50ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
51ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
52
53COPY ./exec_tests.sh /usr/local/bin/
54
55ENV NSB_DIR="/opt/nsb_bin" \
56 PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl"
57
58WORKDIR ${REPOS_DIR}
59CMD ["/usr/bin/supervisord"]