mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-02-10 21:55:12 +08:00
Deploying to gh-pages from @ eunomia-bpf/bpf-developer-tutorial@ab0d1eef08 🚀
This commit is contained in:
39
third_party/bpftool/Dockerfile
vendored
Normal file
39
third_party/bpftool/Dockerfile
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# With this Dockerfile, you can create a container image:
|
||||
# $ docker build -f Dockerfile -t bpftool .
|
||||
# And then use it:
|
||||
# $ docker run --rm -ti --privileged --pid=host bpftool prog
|
||||
|
||||
# hadolint global ignore=DL3008
|
||||
|
||||
FROM ubuntu:22.04 as builder
|
||||
|
||||
RUN \
|
||||
export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get -y install --no-install-recommends \
|
||||
build-essential \
|
||||
libelf-dev \
|
||||
libz-dev \
|
||||
libcap-dev \
|
||||
clang llvm llvm-dev lld \
|
||||
binutils-dev \
|
||||
pkg-config && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . /src
|
||||
RUN \
|
||||
make -C /src/src clean && \
|
||||
make -C /src/src -j "$(nproc)"
|
||||
|
||||
FROM ubuntu:22.04
|
||||
RUN \
|
||||
export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get -y install --no-install-recommends \
|
||||
libelf1 \
|
||||
llvm && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /src/src/bpftool /bin/bpftool
|
||||
|
||||
ENTRYPOINT ["/bin/bpftool"]
|
||||
Reference in New Issue
Block a user