forked from cilium/tetragon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
43 lines (38 loc) · 1.55 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM quay.io/cilium/clang:b97f5b3d5c38da62fb009f21a53cd42aefd54a2f@sha256:e1c8ed0acd2e24ed05377f2861d8174af28e09bef3bbc79649c8eba165207df0 AS bpf-builder
WORKDIR /go/src/github.com/cilium/tetragon
RUN apt-get update
RUN apt-get install -y linux-libc-dev
COPY . ./
RUN make tetragon-bpf LOCAL_CLANG=1
FROM quay.io/cilium/cilium-bpftool@sha256:1832b32d118e7006ea2ce530b14ae5b28acd55fa15d8ab270f354736ae4f77e9 AS bpftool
COPY . ./
FROM docker.io/library/golang:1.22.6@sha256:2bd56f00ff47baf33e64eae7996b65846c7cb5e0a46e0a882ef179fd89654afa
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y \
linux-libc-dev \
rpm2cpio \
cpio \
git \
flex \
bison \
autoconf \
libelf-dev \
libcap-dev \
bc \
netcat-traditional \
vim \
file \
strace \
jq \
less
RUN mkdir -p /etc/tetragon/tetragon.conf.d/ && \
mkdir -p /etc/tetragon/tetragon.tp.d/
COPY --from=bpf-builder /go/src/github.com/cilium/tetragon/bpf/objs/*.o /var/lib/tetragon/
COPY --from=bpftool /bin/bpftool /usr/bin/
WORKDIR /go/src/github.com/cilium/tetragon
COPY . ./
RUN make tetragon tetra test-compile contrib-progs
ENV TETRAGON_PROCFS=/procRoot/
# CMD ["sh", "-c", "/go/src/github.com/cilium/tetragon/tetragon --procfs=/procRoot/ --export-filename=/tmp/tetragon.log --metrics-server :2112 --verbose 4"]
CMD ["sh", "-c", "/go/src/github.com/cilium/tetragon/tetragon --procfs=/procRoot/"]