apprise/Dockerfile.f37

34 lines
1.2 KiB
Docker
Raw Normal View History

2022-11-15 20:21:20 +01:00
# Base
FROM fedora:37
ENV container docker
RUN \
rm -f /usr/lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /usr/lib/systemd/system/local-fs.target.wants/*; \
rm -f /usr/lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /usr/lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /usr/lib/systemd/system/basic.target.wants/*;\
rm -f /usr/lib/systemd/system/anaconda.target.wants/*; \
echo "assumeyes=1" >> /etc/dnf/dnf.conf; \
dnf install -y epel-release; \
dnf install -y rpm-build rpmlint python3-pip rubygem-ronn \
dnf-plugins-core 'dnf-command(config-manager)' \
'dnf-command(builddep)' sudo rsync rpmdevtools;
COPY packaging/redhat/python-apprise.spec /
# Place our build file into the path
COPY bin/build-rpm.sh /usr/bin
RUN rpmspec -q --buildrequires /python-apprise.spec | cut -f1 -d' ' | \
xargs dnf install -y
# RPM Build Structure Setup
ENV FLAVOR=rpmbuild OS=centos DIST=el8
RUN useradd builder -u 1000 -m -G users,wheel &>/dev/null && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
VOLUME ["/apprise"]
WORKDIR /apprise
# RPMs should never be built as root
USER builder