NFVBENCH-26 Update TRex version to 2.29
[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.29"
5 ENV NFVBENCH_TAG "1.0.7"
6
7 RUN apt-get update && apt-get install -y \
8        git \
9        kmod \
10        pciutils \
11        python \
12        python-pip \
13        vim \
14        wget \
15        net-tools \
16        && mkdir /tmp/http_root \
17        && mkdir -p /opt/trex \
18        && mkdir /var/log/nfvbench \
19        && wget --no-cache https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz \
20        && tar xzf $TREX_VER.tar.gz -C /opt/trex \
21        && rm -f /$TREX_VER.tar.gz \
22        && rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz \
23        && cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/stl/trex_stl_lib /usr/local/lib/python2.7/dist-packages/ \
24        && rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/stl/trex_stl_lib \
25        && sed -i -e "s/2048 /512 /" -e "s/2048\"/512\"/" /opt/trex/$TREX_VER/trex-cfg \
26        && pip install -U pip pbr \
27        && pip install -U setuptools \
28        && cd / \
29        && git clone --depth 1 -b $NFVBENCH_TAG https://gerrit.opnfv.org/gerrit/nfvbench \
30        && cd /nfvbench && pip install -e . \
31        && python ./docker/cleanup_generators.py \
32        && rm -rf /nfvbench/.git \
33        && apt-get remove -y wget git \
34        && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
35
36 ENV TREX_STL_EXT_PATH "/opt/trex/$TREX_VER/external_libs"
37
38 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]
39