mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Add Dockerfile.rpmbuild9
This commit is contained in:
parent
70839d87c8
commit
23815bb174
37
docker/rpmbuild/Dockerfile.rpmbuild9
Normal file
37
docker/rpmbuild/Dockerfile.rpmbuild9
Normal file
@ -0,0 +1,37 @@
|
||||
# Dockerfile for build RPM packages.
|
||||
# Copyright (C) 2022 Teddysun <i@teddysun.com>
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} almalinux:9
|
||||
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 \
|
||||
rpm-build rpm-devel rpmlint rpmdevtools \
|
||||
asciidoc audit-libs-devel binutils-devel flex \
|
||||
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 \
|
||||
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 && \
|
||||
mkdir -p /home/builder/rpmbuild && \
|
||||
chown -R builder /home/builder
|
||||
|
||||
USER builder
|
||||
VOLUME /home/builder
|
||||
WORKDIR /home/builder/rpmbuild
|
||||
CMD ["/bin/bash"]
|
Loading…
x
Reference in New Issue
Block a user