-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile.glibc.generic
More file actions
34 lines (24 loc) · 985 Bytes
/
Dockerfile.glibc.generic
File metadata and controls
34 lines (24 loc) · 985 Bytes
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
FROM ubuntu:24.04 AS build
ARG ARCH=x86
ENV ARCH=$ARCH
ARG KERNEL_VERSION=5.4.20
ENV KERNEL_VERSION=$KERNEL_VERSION
ENV _LIBC=glibc
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y build-essential autoconf automake coreutils pkg-config \
bc libelf-dev libssl-dev clang-tools-18 libclang-18-dev \
clang-18 llvm-18 rsync bison flex tar xz-utils wget
RUN mkdir -p /usr/src && \
cd /usr/src && \
wget -q https://cdn.kernel.org/pub/linux/kernel/v$(echo "$KERNEL_VERSION" | cut -f 1 -d '.').x/linux-${KERNEL_VERSION}.tar.xz && \
tar -xf linux-${KERNEL_VERSION}.tar.xz && \
ln -s linux-${KERNEL_VERSION} linux
COPY kernel-patches/${KERNEL_VERSION} /usr/src/linux-${KERNEL_VERSION}-patches
COPY .dockerfiles/patch_kernel.sh /patch_kernel.sh
RUN /patch_kernel.sh
ENV PATH=/usr/lib/llvm-18/bin:$PATH
WORKDIR /kernel-collector
COPY .dockerfiles/build.sh /build.sh
COPY . .
CMD ["/build.sh"]