Skip to content

Commit

Permalink
Install uapi headers to fix libbpfgo build
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrik committed May 5, 2023
1 parent 3ebd7b4 commit 7681734
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ RUN apt-get update && \

RUN mkdir /build && \
git clone --branch v1.2.0 --depth 1 https://github.com/libbpf/libbpf.git /build/libbpf && \
make -j $(nproc) -C /build/libbpf/src BUILD_STATIC_ONLY=y LIBSUBDIR=lib install && \
tar -czf /build/libbpf.tar.gz /usr/lib/libbpf.a /usr/lib/pkgconfig/libbpf.pc /usr/include/bpf
make -j $(nproc) -C /build/libbpf/src BUILD_STATIC_ONLY=y LIBSUBDIR=lib install install_uapi_headers && \
tar -czf /build/libbpf.tar.gz \
/usr/lib/libbpf.a \
/usr/lib/pkgconfig/libbpf.pc \
/usr/include/bpf \
/usr/include/uapi/linux/bpf.h \
/usr/include/uapi/linux/bpf_common.h \
/usr/include/uapi/linux/btf.h

COPY ./ /build/ebpf_exporter

Expand Down

0 comments on commit 7681734

Please sign in to comment.