NFVBENCH-172: Add quartiles and 99 percentile latency values
[nfvbench.git] / docker / Dockerfile
1 # docker file for creating a container that has nfvbench installed and ready to use
2 FROM ubuntu:16.04
3
4 ENV TREX_VER "v2.79"
5 ENV VM_IMAGE_VER "0.12"
6 ENV PYTHONIOENCODING "utf8"
7
8 # Note: do not clone with --depth 1 as it will cause pbr to fail extracting the nfvbench version
9 # from the git tag
10
11 RUN apt-get update && apt-get install -y software-properties-common
12
13 RUN add-apt-repository -y ppa:deadsnakes/ppa
14
15 RUN apt-get update && apt-get install -y \
16        git \
17        kmod \
18        pciutils \
19        python3.6 \
20        vim \
21        wget \
22        net-tools \
23        iproute2 \
24        libelf1 \
25        python3-dev \
26        libpython3.6-dev \
27        gcc \
28        && ln -s /usr/bin/python3.6 /usr/local/bin/python3 \
29        && mkdir -p /opt/trex \
30        && mkdir /var/log/nfvbench \
31        && wget --no-cache --no-check-certificate https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz \
32        && tar xzf $TREX_VER.tar.gz -C /opt/trex \
33        && rm -f /$TREX_VER.tar.gz \
34        && rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz \
35        && cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex /usr/local/lib/python3.6/dist-packages/ \
36        && rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex \
37        && wget https://bootstrap.pypa.io/get-pip.py \
38        && python3 get-pip.py \
39        && pip3 install -U pbr \
40        && pip3 install -U setuptools \
41        && cd / \
42        && git clone https://gerrit.opnfv.org/gerrit/nfvbench \
43        && cd /nfvbench && pip3 install -e . \
44        && wget -O nfvbenchvm-$VM_IMAGE_VER.qcow2 http://artifacts.opnfv.org/nfvbench/images/nfvbenchvm_centos-$VM_IMAGE_VER.qcow2 \
45        # Override Xtesting testcases.yaml file by NFVbench default one
46        && cp xtesting/testcases.yaml /usr/local/lib/python3.6/dist-packages/xtesting/ci/testcases.yaml \
47        && python3 ./docker/cleanup_generators.py \
48        && rm -rf /nfvbench/.git \
49        && apt-get remove -y wget git python3-dev libpython3.6-dev gcc \
50        && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
51
52 ENV TREX_EXT_LIBS "/opt/trex/$TREX_VER/external_libs"
53
54
55 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]