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 FROM debian:buster-slim
MAINTAINER Jessica Frazelle <jess@linux.com> MAINTAINER Jessica Frazelle <jess@linux.com>
ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV PATH /usr/share/bcc/tools:$PATH
ENV GOPATH /go
# Add non-free apt sources # 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 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/* && rm -rf /var/lib/apt/lists/*
# Build libbcc # 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 RUN git clone --depth 1 --branch "$BCC_VERSION" https://github.com/iovisor/bcc.git /usr/src/bcc
WORKDIR /usr/src/bcc RUN ( \
RUN mkdir build \ cd /usr/src/bcc \
&& cd build \ && mkdir build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ && cd build \
&& make \ && cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
&& 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 \
&& make \ && make \
&& make install \ && make install \
&& ldconfig \
) \ ) \
&& rm -rf "$PROTOBUFPATH" && rm -rf /usr/src/bcc
ENV PATH /usr/share/bcc/tools:$PATH
COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh

View File

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