2022-05-31 18:12:59 +09:00
|
|
|
# Dockerfile for build RPM packages.
|
2024-12-29 23:22:33 +09:00
|
|
|
# Copyright (C) 2022 - 2024 Teddysun <i@teddysun.com>
|
2022-05-31 18:12:59 +09:00
|
|
|
|
2024-12-29 23:22:33 +09:00
|
|
|
FROM rockylinux:9
|
2022-05-31 18:12:59 +09:00
|
|
|
LABEL maintainer="Teddysun <i@teddysun.com>"
|
|
|
|
|
|
|
|
RUN yum install -y yum-utils epel-release && \
|
|
|
|
yum-config-manager --enable epel && \
|
|
|
|
yum-config-manager --enable crb && \
|
|
|
|
rpm -e --nodeps coreutils-single && \
|
|
|
|
yum install -y tar wget git tree gcc gcc-c++ \
|
|
|
|
sudo net-tools make cmake zstd libzstd chkconfig \
|
|
|
|
bash coreutils diffutils patch ca-certificates \
|
2022-05-31 18:34:49 +09:00
|
|
|
rpm-build rpm-devel rpmlint rpmdevtools ncurses which procps \
|
2023-07-01 23:06:01 +09:00
|
|
|
asciidoc audit-libs-devel binutils-devel flex jq gettext \
|
2022-05-31 18:12:59 +09:00
|
|
|
libcap-devel newt-devel pciutils-devel perl-generators \
|
|
|
|
python3 python3-devel python3-docutils rsync xmlto bc bison \
|
|
|
|
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
|
2022-10-13 21:22:08 +09:00
|
|
|
bpftool dwarves gcc-plugin-devel glibc-static hmaccalc kernel-rpm-macros \
|
|
|
|
libbabeltrace-devel libbpf-devel libcap-ng-devel libnl3-devel libtraceevent-devel \
|
2022-05-31 18:12:59 +09:00
|
|
|
elfutils-devel xz-devel perl-ExtUtils-Embed && \
|
|
|
|
yum clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
|
|
|
|
|
|
|
|
RUN useradd builder -u 1000 -m -G users,wheel && \
|
|
|
|
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
|
|
|
echo "# macros" > /home/builder/.rpmmacros && \
|
|
|
|
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
|
|
|
|
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
|
|
|
|
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
|
|
|
|
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
|
|
|
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
|
|
|
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
2023-07-02 16:23:29 +09:00
|
|
|
echo "set enable-bracketed-paste off" >> /etc/inputrc && \
|
2022-05-31 18:12:59 +09:00
|
|
|
mkdir -p /home/builder/rpmbuild && \
|
|
|
|
chown -R builder /home/builder
|
|
|
|
|
|
|
|
USER builder
|
|
|
|
VOLUME /home/builder
|
|
|
|
WORKDIR /home/builder/rpmbuild
|
|
|
|
CMD ["/bin/bash"]
|