better bcc

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-09-14 10:18:41 -04:00
parent 26143f9c2f
commit 0365820d00
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
2 changed files with 9 additions and 29 deletions

View File

@ -9,8 +9,7 @@
FROM debian:buster-slim
MAINTAINER Jessica Frazelle <jess@linux.com>
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
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
@ -54,37 +53,17 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# Build libbcc
ENV BCC_VERSION v0.7.0
ENV BCC_VERSION v1
RUN git clone --depth 1 --branch "$BCC_VERSION" https://github.com/iovisor/bcc.git /usr/src/bcc
WORKDIR /usr/src/bcc
RUN mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
&& make \
&& make install
# Install Go
ENV GO_VERSION 1.11
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
| tar -xzC /usr/local
# Install google/protobuf
ENV PROTOBUF_VERSION v3.6.1
RUN set -x \
&& export PROTOBUF_PATH="$(mktemp -d)" \
&& curl -fsSL "https://github.com/google/protobuf/archive/${PROTOBUF_VERSION}.tar.gz" \
| tar -xzC "$PROTOBUF_PATH" --strip-components=1 \
&& ( \
cd "$PROTOBUF_PATH" \
&& ./autogen.sh \
&& ./configure --prefix=/usr/local \
RUN ( \
cd /usr/src/bcc \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
&& make \
&& make install \
&& ldconfig \
) \
&& rm -rf "$PROTOBUFPATH"
ENV PATH /usr/share/bcc/tools:$PATH
&& rm -rf /usr/src/bcc
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

View File

@ -95,6 +95,7 @@ compare() {
projects=(
noelbundick/azure-cli-extension-noelbundick
iovisor/bcc
browsh-org/browsh
certbot/certbot
hashicorp/consul