-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (23 loc) · 971 Bytes
/
Dockerfile
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
FROM rockylinux:8.7.20221219
RUN yum install -y gcc gcc-c++ \
libtool libtool-ltdl \
make cmake \
git \
pkgconfig \
sudo \
automake autoconf \
yum-utils rpm-build && \
yum clean all
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 /home/builder/rpm && \
chown -R builder /home/builder
USER builder
ENV FLAVOR=rpmbuild OS=centos DIST=el8