Skip to content

Instantly share code, notes, and snippets.

@krsna1729
Created June 28, 2019 04:59
Show Gist options
  • Save krsna1729/224c3b548914c9504ac8e3d8d40bcebd to your computer and use it in GitHub Desktop.
Save krsna1729/224c3b548914c9504ac8e3d8d40bcebd to your computer and use it in GitHub Desktop.
libbpf compilation
FROM ubuntu:18.04 as libbpf
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
ca-certificates \
gcc \
libelf-dev \
make \
pkg-config \
unzip \
wget
ARG LIBBPF_COMMIT=master
RUN wget -O libbpf.zip https://github.com/libbpf/libbpf/archive/${LIBBPF_COMMIT}.zip && unzip libbpf.zip
WORKDIR libbpf-${LIBBPF_COMMIT}/src
RUN mkdir -p /libbpf/build /libbpf/root \
&& BUILD_STATIC_ONLY=y OBJDIR=/libbpf/build DESTDIR=/libbpf/root make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment