From d5f99ca7dc365e105bffba021915a18868204110 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Fri, 30 Aug 2019 15:41:24 -0700 Subject: [PATCH] add bpftrace Signed-off-by: Jess Frazelle --- bpftrace/Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 bpftrace/Dockerfile diff --git a/bpftrace/Dockerfile b/bpftrace/Dockerfile new file mode 100644 index 0000000..93d5f01 --- /dev/null +++ b/bpftrace/Dockerfile @@ -0,0 +1,32 @@ +FROM r.j3ss.co/bcc +MAINTAINER Jessica Frazelle + +ENV PATH /usr/share/bcc/tools:$PATH + +# Add non-free apt sources +RUN sed -i "s#deb http://deb.debian.org/debian buster main#deb http://deb.debian.org/debian buster main contrib non-free#g" /etc/apt/sources.list + +RUN apt-get update && apt-get install -y \ + ca-certificates \ + clang \ + curl \ + gcc \ + git \ + g++ \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +# Build bpftrace +ENV BPFTRACE_VERSION v0.9.2 +RUN git clone --depth 1 --branch "$BPFTRACE_VERSION" https://github.com/iovisor/bpftrace.git /usr/src/bpftrace \ + && ( \ + cd /usr/src/bpftrace \ + && mkdir build \ + && cd build \ + && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. \ + && make -j8 \ + && make install \ + ) \ + && rm -rf /usr/src/bpftrace + +ENTRYPOINT ["bpftrace"]