-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile.glibc.centos7
49 lines (37 loc) · 1.77 KB
/
Dockerfile.glibc.centos7
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
44
45
46
47
48
49
FROM centos:7.9.2009 AS build
ARG ARCH=x86
ENV ARCH=$ARCH
ENV KERNEL_VERSION=3.10.0-1160.76.1.el7
ENV _LIBC=glibc
RUN yum update -y && \
yum groupinstall -y "Development tools" && \
yum install -y asciidoc audit-libs-devel bash bc binutils binutils-devel \
bison diffutils elfutils elfutils-devel \
elfutils-libelf-devel findutils flex gawk gcc gettext \
gzip hmaccalc hostname java-devel m4 make \
module-init-tools ncurses-devel net-tools newt-devel \
numactl-devel openssl openssl-devel patch pciutils-devel \
perl perl-ExtUtils-Embed pesign python-devel \
python-docutils redhat-rpm-config rpm-build sh-utils tar \
xmlto xz zlib-devel glibc-headers
RUN yum install -y centos-release-scl && \
yum-config-manager --enable rhel-server-rhscl-7-rpms && \
yum install -y llvm-toolset-7.0*
RUN mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} && \
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros && \
rpm -i https://vault.centos.org/7.9.2009/updates/Source/SPackages/kernel-${KERNEL_VERSION}.src.rpm 2>&1
RUN cd ~/rpmbuild/SOURCES && \
tar -xf linux-${KERNEL_VERSION}.tar.xz && \
cp -f kernel-3.10.0-x86_64.config linux-${KERNEL_VERSION}/.config
RUN cd /usr/src && \
ln -s ~/rpmbuild/SOURCES/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
WORKDIR /kernel-collector
#COPY .dockerfiles/change_libbpf.sh /change_libbpf.sh
#RUN /change_libbpf.sh "3" "10"
COPY .dockerfiles/build.sh /build.sh
COPY . .
ENTRYPOINT ["scl"]
CMD ["enable", "llvm-toolset-7.0", "/build.sh"]