summaryrefslogtreecommitdiff
path: root/tools/sppc/build/ubuntu/pktgen/Dockerfile.18.04
blob: 5ade82328977da54776ee8d987be22d73f1ede04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:18.04

ARG rte_sdk
ARG rte_target
ARG home_dir
ARG dpdk_repo
ARG dpdk_branch
ARG pktgen_repo
ARG pktgen_branch
ARG pktgen_dir

ENV PATH ${rte_sdk}/${rte_target}/app:${PATH}
ENV http_proxy ${http_proxy}
ENV https_proxy $https_proxy
ENV no_proxy ${no_proxy}
ENV RTE_SDK ${rte_sdk}
ENV RTE_TARGET ${rte_target}
ENV PKTGEN_DIR ${pktgen_dir}
ENV PATH ${rte_sdk}/${rte_target}/app:${PATH}
ENV PATH ${home_dir}/${pktgen_dir}/app/${rte_target}/:${PATH}
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
    git \
    gcc \
    python \
    pciutils \
    make \
    libnuma-dev \
    gcc-multilib \
    libarchive-dev \
    linux-headers-$(uname -r) \
    libpcap-dev \
    liblua5*-dev \
    pkg-config \
    wget \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

WORKDIR $home_dir
RUN git clone ${dpdk_branch} ${dpdk_repo}
RUN git clone ${pktgen_branch} ${pktgen_repo}

# Compile DPDK and pktgen
WORKDIR ${rte_sdk}
RUN make -j install T=${rte_target}

WORKDIR ${home_dir}/${pktgen_dir}
RUN make -j

# Set working directory when container is launched
WORKDIR ${home_dir}
ADD env.sh ${home_dir}/env.sh
RUN echo "source ${home_dir}/env.sh" >> ${home_dir}/.bashrc