1 # docker file for creating a container that has nfvbench installed and ready to use
7 # Note: do not clone with --depth 1 as it will cause pbr to fail extracting the nfvbench version
10 RUN apt-get update && apt-get install -y \
21 && mkdir -p /opt/trex \
22 && mkdir /var/log/nfvbench \
23 && wget --no-cache https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz \
24 && tar xzf $TREX_VER.tar.gz -C /opt/trex \
25 && rm -f /$TREX_VER.tar.gz \
26 && rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz \
27 && cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex /usr/local/lib/python2.7/dist-packages/ \
28 && rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex \
29 && sed -i -e "s/2048 /512 /" -e "s/2048\"/512\"/" /opt/trex/$TREX_VER/trex-cfg \
30 && apt-get remove -y python-pip \
31 && wget https://bootstrap.pypa.io/get-pip.py \
32 && python get-pip.py \
33 && pip install -U pbr \
34 && pip install -U setuptools \
36 && git clone https://gerrit.opnfv.org/gerrit/nfvbench \
37 && cd /nfvbench && pip install -e . \
38 && wget -O nfvbenchvm-$VM_IMAGE_VER.qcow2 http://artifacts.opnfv.org/nfvbench/images/nfvbenchvm_centos-$VM_IMAGE_VER.qcow2 \
39 && python ./docker/cleanup_generators.py \
40 && rm -rf /nfvbench/.git \
41 && apt-get remove -y wget git \
42 && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
44 ENV TREX_EXT_LIBS "/opt/trex/$TREX_VER/external_libs"
47 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]