1 # docker file for creating a container that has nfvbench installed and ready to use
5 ENV NFVBENCH_TAG "1.2.6"
8 RUN apt-get update && apt-get install -y \
18 && mkdir /tmp/http_root \
19 && mkdir -p /opt/trex \
20 && mkdir /var/log/nfvbench \
21 && wget --no-cache https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz \
22 && tar xzf $TREX_VER.tar.gz -C /opt/trex \
23 && rm -f /$TREX_VER.tar.gz \
24 && rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz \
25 && cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/stl/trex_stl_lib /usr/local/lib/python2.7/dist-packages/ \
26 && rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/stl/trex_stl_lib \
27 && sed -i -e "s/2048 /512 /" -e "s/2048\"/512\"/" /opt/trex/$TREX_VER/trex-cfg \
28 && pip install -U pip pbr \
29 && pip install -U setuptools \
31 && git clone --depth 1 -b $NFVBENCH_TAG https://gerrit.opnfv.org/gerrit/nfvbench \
32 && cd /nfvbench && pip install -e . \
33 && wget -O nfvbenchvm-$VM_IMAGE_VER.qcow2 http://artifacts.opnfv.org/nfvbench/images/nfvbenchvm_centos-$VM_IMAGE_VER.qcow2 \
34 && python ./docker/cleanup_generators.py \
35 && rm -rf /nfvbench/.git \
36 && apt-get remove -y wget git \
37 && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
39 ENV TREX_STL_EXT_PATH "/opt/trex/$TREX_VER/external_libs"
41 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]