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 \
25 && ln -s /usr/bin/python3.6 /usr/local/bin/python3 \
26 && mkdir -p /opt/trex \
27 && mkdir /var/log/nfvbench \
28 && wget --no-cache https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz \
29 && tar xzf $TREX_VER.tar.gz -C /opt/trex \
30 && rm -f /$TREX_VER.tar.gz \
31 && rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz \
32 && cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex /usr/local/lib/python3.6/dist-packages/ \
33 && rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex \
34 && wget https://bootstrap.pypa.io/get-pip.py \
35 && python3 get-pip.py \
36 && pip3 install -U pbr \
37 && pip3 install -U setuptools \
39 && git clone https://gerrit.opnfv.org/gerrit/nfvbench \
40 && cd /nfvbench && pip3 install -e . \
41 && wget -O nfvbenchvm-$VM_IMAGE_VER.qcow2 http://artifacts.opnfv.org/nfvbench/images/nfvbenchvm_centos-$VM_IMAGE_VER.qcow2 \
42 && python3 ./docker/cleanup_generators.py \
43 && rm -rf /nfvbench/.git \
44 && apt-get remove -y wget git \
45 && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
47 ENV TREX_EXT_LIBS "/opt/trex/$TREX_VER/external_libs"
50 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]