Files
linuxkit/pkg/bpftrace/Dockerfile
Rolf Neugebauer ea8ecd146d pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-05-10 14:52:05 +01:00

38 lines
989 B
Docker

FROM linuxkit/alpine:e2391e0b164c57db9f6c4ae110ee84f766edc430 AS build
RUN apk add --update \
bison \
build-base \
clang-dev \
clang-static \
cmake \
elfutils-dev \
flex-dev \
git \
linux-headers \
llvm5-dev \
llvm5-static \
zlib-dev
# Put LLVM directories where CMake expects them to be
RUN ln -s /usr/lib/cmake/llvm5 /usr/lib/cmake/llvm
RUN ln -s /usr/include/llvm5/llvm /usr/include/llvm
RUN ln -s /usr/include/llvm5/llvm-c /usr/include/llvm-c
ENV GITREPO=https://github.com/iovisor/bpftrace.git
ENV COMMIT=8f7f8214d7dd7bc25b7740a3c0e9a580a89e0244
ENV STATIC_LINKING=on
ENV RUN_TESTS=0
RUN git clone ${GITREPO} /bpftrace \
&& cd /bpftrace/ \
&& mkdir -p /bpftrace/build \
&& git checkout ${COMMIT} \
&& chmod +x /bpftrace/docker/build.sh \
&& /bpftrace/docker/build.sh /bpftrace/build Release -j$(nproc)
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=build /bpftrace/build/src/bpftrace /usr/bin/bpftrace