-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(integration): separate base build and kubectl trace image
Signed-off-by: Lorenzo Fontana <lo@linux.com>
- Loading branch information
Showing
5 changed files
with
76 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
ARG bpftracesha | ||
|
||
FROM alpine:3.8 as builder | ||
ENV STATIC_LINKING=ON | ||
ENV RUN_TESTS=0 | ||
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 | ||
|
||
WORKDIR / | ||
|
||
RUN git clone https://github.com/iovisor/bpftrace.git /bpftrace | ||
|
||
WORKDIR /bpftrace | ||
|
||
#RUN git checkout ${bpftracesha} | ||
|
||
WORKDIR /bpftrace/docker | ||
|
||
RUN sh build.sh /bpftrace/build-release Release |
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,21 @@ | ||
ARG bpftracesha | ||
|
||
FROM quay.io/fntlnz/kubectl-trace-bpftrace-base:${bpftracesha} as bpftrace | ||
FROM golang:1.11.4-alpine3.8 as gobuilder | ||
|
||
RUN apk update | ||
RUN apk add 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 alpine:3.8 | ||
|
||
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 | ||
COPY --from=bpftrace /bpftrace/build-release/src/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
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