Skip to content

Commit

Permalink
chore(bpftracebase): bump bpftrace base to 81b099f094d2e6092cfe1317cb…
Browse files Browse the repository at this point in the history
…aaba0c1bbb614f and bcc 0.8.0

Signed-off-by: Lorenzo Fontana <[email protected]>
  • Loading branch information
fntlnz committed Mar 8, 2019
1 parent 12b88dd commit 9b13024
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Dockerfile.bpftracebase
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
FROM alpine:3.8 as builder
ARG bpftracesha
ARG bccversion
ENV STATIC_LINKING=ON
ENV RUN_TESTS=0
RUN apk add --update \
bison \
build-base \
clang-dev \
clang-static \
curl \
cmake \
elfutils-dev \
flex-dev \
git \
linux-headers \
llvm5-dev \
llvm5-static \
python \
zlib-dev

# Put LLVM directories where CMake expects them to be
Expand All @@ -22,6 +25,14 @@ RUN ln -s /usr/include/llvm5/llvm /usr/include/llvm
RUN ln -s /usr/include/llvm5/llvm-c /usr/include/llvm-c

WORKDIR /
RUN curl -L https://github.com/iovisor/bcc/archive/v${bccversion}.tar.gz \
--output /bcc.tar.gz
RUN tar xvf /bcc.tar.gz
RUN mv bcc-${bccversion} bcc
RUN cd /bcc && mkdir build && cd build && cmake .. && make install -j4 && \
cp src/cc/libbcc.a /usr/local/lib64/libbcc.a && \
cp src/cc/libbcc-loader-static.a /usr/local/lib64/libbcc-loader-static.a && \
cp src/cc/libbpf.a /usr/local/lib64/libbpf.a

ADD https://github.com/iovisor/bpftrace/archive/${bpftracesha}.tar.gz /bpftrace.tar.gz
RUN tar -xvf /bpftrace.tar.gz
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ IMAGE_INITCONTAINER_BRANCH := $(IMAGE_NAME_INIT):$(GIT_BRANCH_CLEAN)
IMAGE_INITCONTAINER_COMMIT := $(IMAGE_NAME_INIT):$(GIT_COMMIT)
IMAGE_INITCONTAINER_LATEST := $(IMAGE_NAME_INIT):latest

BPFTRACESHA ?= 2ae2a53f62622631a304def6c193680e603994e3
BPFTRACESHA ?= 81b099f094d2e6092cfe1317cbaaba0c1bbb614f
BCCVERSION ?= 0.8.0
IMAGE_BPFTRACE_BASE := $(IMAGE_NAME_BASE):$(BPFTRACESHA)

IMAGE_BUILD_FLAGS ?= "--no-cache"
Expand Down Expand Up @@ -75,7 +76,7 @@ integration:

.PHONY: bpftraceimage/build
bpftraceimage/build:
$(DOCKER) build --build-arg bpftracesha=$(BPFTRACESHA) $(IMAGE_BUILD_FLAGS) -t $(IMAGE_BPFTRACE_BASE) -f Dockerfile.bpftracebase .
$(DOCKER) build --build-arg bccversion=$(BCCVERSION) --build-arg bpftracesha=$(BPFTRACESHA) $(IMAGE_BUILD_FLAGS) -t $(IMAGE_BPFTRACE_BASE) -f Dockerfile.bpftracebase .

.PHONY: bpftraceimage/push
bpftraceimage/push:
Expand Down

0 comments on commit 9b13024

Please sign in to comment.