-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile-ovs-dpdk
65 lines (54 loc) · 1.7 KB
/
Dockerfile-ovs-dpdk
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
55
56
57
58
59
60
61
62
63
64
65
FROM quay.io/centos/centos:8
LABEL maintainer="Sebastian Scheinkman <[email protected]>"
ARG DPDK_VER=20.11.1
ENV DPDK_VER ${DPDK_VER}
ENV DPDK_DIR /usr/src/dpdk-stable-${DPDK_VER}
ENV RTE_TARGET=x86_64-native-linuxapp-gcc
ENV RTE_SDK=${DPDK_DIR}
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/
ARG OVS_VER=2.16.2
ENV OVS_VER ${OVS_VER}
RUN dnf install dnf-plugins-core -y && dnf config-manager --set-enabled powertools && dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# The second dnf install is here to overcome versions mismatch between rpms
RUN dnf install -y wget python39.x86_64\
numactl \
numactl-devel \
make \
logrotate \
ethtool \
patch \
which \
readline-devel \
iproute \
libibverbs \
lua \
git \
gcc \
expect \
sysstat \
perf \
htop \
net-tools \
libibverbs-devel \
perf \
htop \
tcpdump \
diffutils && \
dnf clean all
RUN pip3.9 install meson ninja pyelftools
RUN cd /usr/src/ && wget http://fast.dpdk.org/rel/dpdk-${DPDK_VER}.tar.xz && tar -xpvf dpdk-${DPDK_VER}.tar.xz && rm dpdk-${DPDK_VER}.tar.xz && \
cd ${DPDK_DIR} && \
meson build && \
cd build && \
meson configure -Denable_docs=false -Dbuildtype=debug && \
ninja && \
ninja install && \
echo "/usr/local/lib64" > /etc/ld.so.conf.d/dpdk.conf && \
ldconfig
RUN cd /opt/ && wget https://www.openvswitch.org/releases/openvswitch-${OVS_VER}.tar.gz && tar -xpvf openvswitch-${OVS_VER}.tar.gz && rm openvswitch-${OVS_VER}.tar.gz && \
cd openvswitch-${OVS_VER} && \
./configure --with-dpdk=yes --prefix=/usr --localstatedir=/var --sysconfdir=/etc CFLAGS="-Ofast -msse4.2 -mpopcnt" && \
make && \
make install
WORKDIR /opt/
COPY scripts /opt/scripts