-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for ubuntu image in makefile, bump to v0.9
- Loading branch information
Showing
6 changed files
with
78 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM ubuntu:18.04 as builder | ||
ARG bpftracesha | ||
ENV RUN_TESTS=0 | ||
|
||
RUN apt-get update && apt-get install -y wget gnupg && apt-get clean | ||
|
||
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - | ||
COPY build/sources.list /etc/apt/sources.list.d/llvm.list | ||
|
||
RUN wget -O - https://repo.iovisor.org/GPG-KEY | apt-key add - | ||
RUN echo "deb https://repo.iovisor.org/apt/bionic bionic main" > /etc/apt/sources.list.d/iovisor.list | ||
|
||
RUN apt-get update | ||
|
||
RUN apt-get install -y bison cmake flex g++ git libelf-dev zlib1g-dev libfl-dev | ||
RUN apt-get install -y clang-5.0 libclang-5.0-dev libclang-common-5.0-dev libclang1-5.0 libllvm5.0 llvm-5.0 llvm-5.0-dev llvm-5.0-runtime | ||
RUN apt-get install -y libbcc=0.9.0-1 | ||
|
||
ADD https://github.com/iovisor/bpftrace/archive/${bpftracesha}.tar.gz /bpftrace.tar.gz | ||
RUN tar -xvf /bpftrace.tar.gz | ||
|
||
RUN mv bpftrace-${bpftracesha} /bpftrace | ||
|
||
RUN mkdir /bpftrace/build | ||
|
||
WORKDIR /bpftrace/build | ||
|
||
RUN cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/bpftrace .. | ||
RUN make -j9 | ||
RUN make install |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
ARG bpftracesha | ||
ARG imagenamebase | ||
|
||
FROM ${imagenamebase}:${bpftracesha} as bpftrace | ||
FROM golang:1.11.4-stretch as gobuilder | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y make bash git | ||
|
||
ADD . /go/src/github.com/iovisor/kubectl-trace | ||
WORKDIR /go/src/github.com/iovisor/kubectl-trace | ||
|
||
RUN make _output/bin/trace-runner | ||
|
||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get update && apt-get install -y wget gnupg && \ | ||
echo "deb https://repo.iovisor.org/apt/bionic bionic main" > /etc/apt/sources.list.d/iovisor.list && \ | ||
wget -O - https://repo.iovisor.org/GPG-KEY | apt-key add - && \ | ||
apt-get update && apt-get install -y libbcc=0.9.0-1 libclang1-5.0 libllvm5.0 && rm -rf /var/lib/apt/lists/* && apt-get clean | ||
|
||
COPY --from=bpftrace /usr/local/bpftrace/bin/bpftrace /bin/bpftrace | ||
COPY --from=gobuilder /go/src/github.com/iovisor/kubectl-trace/_output/bin/trace-runner /bin/trace-runner | ||
|
||
ENTRYPOINT ["/bin/trace-runner"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main | ||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main | ||
# 5.0 | ||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main | ||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main | ||
# 6.0 | ||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main | ||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main |