-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile.glibc.oracle8
50 lines (38 loc) · 1.79 KB
/
Dockerfile.glibc.oracle8
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
50
FROM almalinux:9 AS build
ARG ARCH=x86
ENV ARCH=$ARCH
ENV KERNEL_VERSION=5.4.17
ENV _LIBC=glibc
# We use "Development tools" to install:
# gcc c/c++ compiler, redhat-rpm-config, strace, rpm-build, make, pkgconfig, gettext, automake, strace64, gdb, bison,
# libtool, autoconf, gcc-c++ compiler, binutils and all dependencies
# hadolint ignore=DL3040,DL3041
RUN dnf update -y && \
dnf install -y gcc make gcc-c++ libtool rpm-build-libs bison && \
dnf install -y asciidoc audit-libs-devel bash bc binutils binutils-devel \
diffutils elfutils elfutils-devel \
elfutils-libelf-devel findutils gawk \
gzip hmaccalc hostname java-devel m4 \
module-init-tools ncurses-devel net-tools newt-devel \
numactl-devel openssl openssl-devel patch pciutils-devel \
perl perl-ExtUtils-Embed pesign \
rpm-build tar xmlto xz zlib-devel clang llvm rsync
# hadolint ignore=SC2016
RUN mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} && \
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros && \
rpm -i https://oss.oracle.com/ol8/SRPMS-updates/kernel-uek-${KERNEL_VERSION}-2136.328.3.el8uek.src.rpm 2>&1
# hadolint ignore=DL3003
RUN cd ~/rpmbuild/SOURCES && \
tar -xf linux-${KERNEL_VERSION}.tar.bz2 && \
mkdir -p /usr/src/kernels
# hadolint ignore=DL3003
RUN cd /usr/src && \
ln -s ~/rpmbuild/SOURCES/linux-${KERNEL_VERSION} linux && \
ln -s /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h /usr/src/linux/include/
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/build.sh /build.sh
COPY . .
CMD ["/build.sh"]