-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild-rpm-Dockerfile
29 lines (23 loc) · 1.14 KB
/
build-rpm-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
27
28
29
FROM centos:8
ARG mementoembed_version
# RPM build dependencies -- thanks: https://www.redhat.com/sysadmin/create-rpm-package
RUN dnf update -y
RUN dnf install -y rpmdevtools rpmlint glibc-langpack-en
# MementoEmbed build/install dependencies
RUN dnf install -y epel-release
RUN dnf install -y nodejs sed grep tar python3-virtualenv makeself which make
# install Python3.8 separately and set it as the default
RUN dnf install -y python38
RUN alternatives --install /usr/bin/python unversioned-python /usr/bin/python3.8 1
# build the RPM
RUN rpmdev-setuptree
RUN printf "#!/bin/bash\nrpmbuild -bs /root/rpmbuild/SPECS/mementoembed.spec\nrpmbuild -bb /root/rpmbuild/SPECS/mementoembed.spec\n" > /root/build-rpms.sh
RUN chmod 0700 /root/build-rpms.sh
COPY source-distro/MementoEmbed-$mementoembed_version.tar.gz /root/rpmbuild/SOURCES
COPY mementoembed.spec /root
RUN sed "s/{{ mementoembed_version }}/$mementoembed_version/g" /root/mementoembed.spec > /root/rpmbuild/SPECS/mementoembed.spec
RUN ls -l /root/rpmbuild/SPECS/
RUN rpmlint /root/rpmbuild/SPECS/mementoembed.spec
# keep running
# ENTRYPOINT [ "tail", "-f", "/dev/null"]
CMD ["/root/build-rpms.sh"]