-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
46 lines (38 loc) · 1.23 KB
/
Dockerfile
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
FROM centos:7.2.1511
MAINTAINER Seungkyu Ahn <[email protected]>
ENV REFRESHED_AT 2016-07-13
LABEL docker run --rm -it --privileged \
-v /sys/bus/pci/devices:/sys/bus/pci/devices \
-v /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepages \
-v /sys/devices/system/node:/sys/devices/system/node \
-v /dev:/dev \
-v /mnt/huge:/mnt/huge \
--name dpdk-docker dpdk-docker-helloworld
ENV DPDK_VERSION=16.04
ENV RTE_SDK=/root/dpdk-${DPDK_VERSION}
ENV RTE_TARGET=build
USER root
# yum update
RUN yum -y update
RUN yum install -y deltarpm gcc make libhugetlbfs-utils libpcap-devel; yum clean all
RUN yum install -y kernel kernel-devel kernel-headers; yum clean all
# dpdk download
COPY modules /lib/modules
COPY kernels /usr/src/kernels
WORKDIR /root
RUN curl -OL http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VERSION}.tar.gz
RUN tar xzf dpdk-${DPDK_VERSION}.tar.gz
WORKDIR /root/dpdk-${DPDK_VERSION}
RUN make config T=x86_64-native-linuxapp-gcc
RUN make
# rm modules and kernels directory
#RUN rm -rf /lib/modules/
#RUN rm -rf /usr/src/kernels/
# Loading Modules to Enable Userspace IO for DPDK
RUN modprobe uio_pci_generic
RUN modprobe vfio-pci
WORKDIR examples/helloworld
RUN make
WORKDIR build/app
ENTRYPOINT [ "./helloworld" ]
CMD [ "-c", " 3", "-n", "3" ]