[NFVBENCH-151] Allocate hugepages on two NUMAs in nfvbenchvm
[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.61"
5 ENV VM_IMAGE_VER "0.10"
6
7 # Note: do not clone with --depth 1 as it will cause pbr to fail extracting the nfvbench version
8 # from the git tag
9
10 RUN apt-get update && apt-get install -y \
11        git \
12        kmod \
13        pciutils \
14        python \
15        python-pip \
16        vim \
17        wget \
18        net-tools \
19        iproute2 \
20        libelf1 \
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 \
35        && cd / \
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/*
43
44 ENV TREX_EXT_LIBS "/opt/trex/$TREX_VER/external_libs"
45
46
47 ENTRYPOINT ["/nfvbench/docker/nfvbench-entrypoint.sh"]