-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.glibc.core
35 lines (26 loc) · 1.11 KB
/
Dockerfile.glibc.core
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
FROM ubuntu:24.04 AS build
ARG ARCH=x86
ENV ARCH=$ARCH
ARG LOCAL_KERNEL_VERSION=6.6.17
ENV _LIBC=glibc
ENV DEBIAN_FRONTEND=noninteractive
# hadolint ignore=DL3018,DL3015,DL3008,DL3009
RUN apt-get update && \
apt-get install -y build-essential autoconf automake coreutils pkg-config \
bc libelf-dev libssl-dev clang-tools-16 libclang-16-dev \
llvm-16 rsync bison flex tar xz-utils wget libbfd-dev \
libcap-dev
# hadolint ignore=DL3059
RUN ln -s /usr/bin/clang-16 /usr/bin/clang && \
ln -s /usr/bin/llvm-strip-16 /usr/bin/llvm-strip
# hadolint ignore=DL3003,SC3009,DL4006,SC2046
RUN mkdir -p /usr/src && \
cd /usr/src && \
wget -q https://cdn.kernel.org/pub/linux/kernel/v$(echo "$LOCAL_KERNEL_VERSION" | cut -f 1 -d '.').x/linux-${LOCAL_KERNEL_VERSION}.tar.xz && \
tar -xf linux-${LOCAL_KERNEL_VERSION}.tar.xz && \
make -C linux-${LOCAL_KERNEL_VERSION}/tools/bpf/bpftool/ && \
cp linux-${LOCAL_KERNEL_VERSION}/tools/bpf/bpftool/bpftool /usr/bin/
WORKDIR /ebpf-co-re
COPY .dockerfiles/build_core.sh /build.sh
COPY . .
CMD ["/build.sh"]