1 # docker file for creating a container that has nfvbench installed and ready to use
5 ENV VM_IMAGE_VER "0.12"
6 ENV PYTHONIOENCODING "utf8"
8 # Note: do not clone with --depth 1 as it will cause pbr to fail extracting the nfvbench version
11 RUN apt-get update && apt-get install -y software-properties-common
13 RUN add-apt-repository -y ppa:deadsnakes/ppa
15 RUN apt-get update && apt-get install -y \
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 \
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/*
52 ENV TREX_EXT_LIBS "/opt/trex/$TREX_VER/external_libs"
55 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]