Remove hardcoded tag from Dockerfile and pick latest
[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.32"
5 ENV VM_IMAGE_VER "0.6"
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        libelf1 \
17        && mkdir /tmp/http_root \
18        && mkdir -p /opt/trex \
19        && mkdir /var/log/nfvbench \
20        && wget --no-cache https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz \
21        && tar xzf $TREX_VER.tar.gz -C /opt/trex \
22        && rm -f /$TREX_VER.tar.gz \
23        && rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz \
24        && cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/stl/trex_stl_lib /usr/local/lib/python2.7/dist-packages/ \
25        && rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/stl/trex_stl_lib \
26        && sed -i -e "s/2048 /512 /" -e "s/2048\"/512\"/" /opt/trex/$TREX_VER/trex-cfg \
27        && pip install -U pip pbr \
28        && hash -r pip \
29        && pip install -U setuptools \
30        && cd / \
31        && git clone --depth 1 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/*
38
39 ENV TREX_STL_EXT_PATH "/opt/trex/$TREX_VER/external_libs"
40
41 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]