diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-11-10 21:26:14 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-11-10 21:27:45 +0530 |
commit | 4fa105c5b4113a9ff4311569709ca99a8fbf5028 (patch) | |
tree | 481ffea4b406da29e3dbf0dd29c4bb67a378be81 /tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile | |
parent | ab6ee21423c20c101a5885924f08a46a86ce5b00 (diff) |
Minor Fixes.
This patch add multiple minor changes.
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: Ieda8af0b8145c1ffde6bfdb7a7394776b42df988
Diffstat (limited to 'tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile')
-rw-r--r-- | tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile b/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile new file mode 100644 index 00000000..8288cf63 --- /dev/null +++ b/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile @@ -0,0 +1,48 @@ +FROM centos:7 as builder + +# +## Install required packages +## +RUN rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo +RUN yum groupinstall -y "Development Tools" +RUN yum install -y wget numactl-devel git golang make; yum clean all +## Debug Tools (if needed): +RUN yum install -y pciutils iproute; yum clean all + +## +## Download and Build APP-NetUtil +## +WORKDIR /root/go/src/ +RUN go get github.com/openshift/app-netutil 2>&1 > /tmp/UserspaceDockerBuild.log || echo "Can ignore no GO files." +WORKDIR /root/go/src/github.com/openshift/app-netutil +RUN make c_sample +RUN cp bin/libnetutil_api.so /lib64/libnetutil_api.so; cp bin/libnetutil_api.h /usr/include/libnetutil_api.h + +## Download and Build DPDK +## +ENV DPDK_VER 21.02 +ENV DPDK_DIR /usr/src/dpdk-${DPDK_VER} +WORKDIR /usr/src/ +RUN wget http://fast.dpdk.org/rel/dpdk-${DPDK_VER}.tar.xz +RUN tar -xpvf dpdk-${DPDK_VER}.tar.xz +ENV RTE_TARGET=x86_64-native-linuxapp-gcc +ENV RTE_SDK=${DPDK_DIR} +WORKDIR ${DPDK_DIR} + +COPY ./vhost_substitute.sh ./vhost_substitute.sh +RUN ./vhost_substitute.sh + +RUN yum install -y epel-release && yum install -y dnf +RUN dnf install -y meson ninja-build +RUN pip3 install pyelftools + +RUN meson build && ninja -C build && ninja -C build install && ldconfig + +EXPOSE 22 8474 + +WORKDIR /usr/src/ +ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig +RUN git clone http://dpdk.org/git/apps/pktgen-dpdk +RUN yum install -y libpcap libpcap-devel +RUN cd pktgen-dpdk && make -j + |