-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 1.04 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
FROM ubuntu:latest
RUN apt-get update && \
apt-get install -y build-essential git cmake \
zlib1g-dev libevent-dev \
libelf-dev llvm \
clang libc6-dev-i386 \
nano pkg-config wget
RUN mkdir /src && git init
WORKDIR /src
RUN wget https://github.com/bpftrace/bpftrace/releases/download/v0.20.4/bpftrace
RUN chmod +x bpftrace
RUN ln -s /usr/include/x86_64-linux-gnu/asm/ /usr/include/asm
RUN git clone https://github.com/libbpf/libbpf-bootstrap.git && \
cd libbpf-bootstrap && \
git submodule update --init --recursive
RUN cd libbpf-bootstrap/libbpf/src && \
make BUILD_STATIC_ONLY=y && \
make install BUILD_STATIC_ONLY=y LIBDIR=/usr/lib/x86_64-linux-gnu/
RUN git clone --recurse-submodules https://github.com/libbpf/bpftool.git && \
cd bpftool/src && \
make -j$(nproc) && \
make install
RUN git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git && \
cp linux/include/uapi/linux/bpf* /usr/include/linux/