Moshe | 0bb532c | 2018-02-26 13:39:57 +0200 | [diff] [blame] | 1 | ############################################################################## |
| 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 |
| 16 | FROM ubuntu:16.04 |
| 17 | |
| 18 | LABEL image=onap/vnftest |
| 19 | |
| 20 | ARG BRANCH=master |
| 21 | |
| 22 | # GIT repo directory |
| 23 | ENV REPOS_DIR="/home/onap/repos" \ |
| 24 | IMAGE_DIR="/home/onap/images/" |
| 25 | |
| 26 | # Set work directory |
| 27 | |
| 28 | # Vnftest repo |
| 29 | ENV VNFTEST_REPO_DIR="${REPOS_DIR}/vnftest" \ |
| 30 | RELENG_REPO_DIR="${REPOS_DIR}/releng" \ |
| 31 | STORPERF_REPO_DIR="${REPOS_DIR}/storperf" |
| 32 | |
| 33 | RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean |
| 34 | RUN easy_install -U setuptools==30.0.0 |
| 35 | RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0 |
| 36 | |
| 37 | RUN mkdir -p ${REPOS_DIR} |
| 38 | |
| 39 | RUN git config --global http.sslVerify false |
| 40 | RUN git clone --depth 1 -b $BRANCH https://gerrit.onap.org/r/vnfsdk/dovetail-integration ${VNFTEST_REPO_DIR} |
| 41 | |
| 42 | WORKDIR ${VNFTEST_REPO_DIR} |
| 43 | RUN ${VNFTEST_REPO_DIR}/install.sh |
| 44 | RUN ${VNFTEST_REPO_DIR}/docker/supervisor.sh |
| 45 | |
| 46 | RUN echo "daemon off;" >> /etc/nginx/nginx.conf |
| 47 | |
| 48 | EXPOSE 6000 |
| 49 | |
| 50 | ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR} |
| 51 | ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR} |
| 52 | |
| 53 | COPY ./exec_tests.sh /usr/local/bin/ |
| 54 | |
| 55 | ENV NSB_DIR="/opt/nsb_bin" \ |
| 56 | PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl" |
| 57 | |
| 58 | WORKDIR ${REPOS_DIR} |
| 59 | CMD ["/usr/bin/supervisord"] |