From a7f4efcdad89cc1edd98ea49d335215c00cab98a Mon Sep 17 00:00:00 2001 From: Caleb Woodbine Date: Wed, 27 Sep 2023 10:48:45 +1300 Subject: [PATCH] feat: add rpmbuild base images for packaging adds the following rpmbuild images - CentOS 7 - CentOS Stream 8 - CentOS Stream 9 --- README.md | 6 ++++-- config.yaml | 6 ++++++ images/rpmbuild-centos-stream8/Dockerfile | 16 ++++++++++++++++ images/rpmbuild-centos-stream9/Dockerfile | 6 ++++++ images/rpmbuild-centos7/Dockerfile | 14 ++++++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 images/rpmbuild-centos-stream8/Dockerfile create mode 100644 images/rpmbuild-centos-stream9/Dockerfile create mode 100644 images/rpmbuild-centos7/Dockerfile diff --git a/README.md b/README.md index 5df0bcf..f4d4267 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,10 @@ list of vendored base images | ghcr.io/geonet/base-images/fedora | fedora for build tasks | | ghcr.io/geonet/base-images/fedora-coreos | fedora coreos for edge devices | | ghcr.io/geonet/base-images/alpine-iputils | includes tools like ping | -| ghcr.io/geonet/base-images/shellcheck | shellcheck bash scripts | - +| ghcr.io/geonet/base-images/shellcheck | shellcheck bash scripts | +| ghcr.io/geonet/base-images/rpmbuild-centos7 | image for building RPMs with, based on CentOS 7 | +| ghcr.io/geonet/base-images/rpmbuild-centos-stream8 | image for building RPMs with, based on CentOS Stream 8 | +| ghcr.io/geonet/base-images/rpmbuild-centos-stream9 | image for building RPMs with, based on CentOS Stream 9 | for tags, check [config.yaml](./config.yaml). diff --git a/config.yaml b/config.yaml index 1134cd8..e11f086 100644 --- a/config.yaml +++ b/config.yaml @@ -84,3 +84,9 @@ build: destination: ghcr.io/geonet/base-images/texlive:latest - source: ./images/chart-centos7/Dockerfile destination: ghcr.io/geonet/base-images/chart-centos7:latest + - source: ./images/rpmbuild-centos7/Dockerfile + destination: ghcr.io/geonet/base-images/rpmbuild-centos7:latest + - source: ./images/rpmbuild-centos-stream8/Dockerfile + destination: ghcr.io/geonet/base-images/rpmbuild-centos-stream8:latest + - source: ./images/rpmbuild-centos-stream9/Dockerfile + destination: ghcr.io/geonet/base-images/rpmbuild-centos-stream9:latest diff --git a/images/rpmbuild-centos-stream8/Dockerfile b/images/rpmbuild-centos-stream8/Dockerfile new file mode 100644 index 0000000..2553b46 --- /dev/null +++ b/images/rpmbuild-centos-stream8/Dockerfile @@ -0,0 +1,16 @@ +FROM ghcr.io/geonet/base-images/centos:stream8 +# Install prerequisites +RUN dnf module enable -y nodejs:16 \ + && dnf install -y epel-release epel-next-release \ + 'dnf-command(config-manager)' \ + && dnf config-manager --set-enabled powertools +# Update system +RUN dnf update -y && \ + dnf install -y boost automake boost-filesystem boost-iostreams \ + boost-program-options boost-regex boost-signals boost-system \ + boost-thread cairo cairo-devel dnf-plugins-core fontconfig \ + fontconfig-devel freetype freetype-devel gcc gcc-c++ git glibc \ + kernel-devel libdbi libdbi-devel libgfortran libxml2 \ + libxml2-devel make ncurses ncurses-devel nodejs npm octave \ + openssl pango pango-devel perl-devel python3 qt5-qtwebengine \ + rpm-build rpmdevtools rpm-sign rpmlint shadow-utils systemd diff --git a/images/rpmbuild-centos-stream9/Dockerfile b/images/rpmbuild-centos-stream9/Dockerfile new file mode 100644 index 0000000..e0fdb62 --- /dev/null +++ b/images/rpmbuild-centos-stream9/Dockerfile @@ -0,0 +1,6 @@ +FROM ghcr.io/geonet/base-images/centos:stream9 +# Installing tools needed for rpmbuild +RUN dnf update -y && \ + dnf install -y \ + rpm-build rpmdevtools rpm-sign rpmlint git dnf-plugins-core nodejs npm make automake gcc \ + gcc-c++ kernel-devel python3 glibc diff --git a/images/rpmbuild-centos7/Dockerfile b/images/rpmbuild-centos7/Dockerfile new file mode 100644 index 0000000..76cab57 --- /dev/null +++ b/images/rpmbuild-centos7/Dockerfile @@ -0,0 +1,14 @@ +FROM ghcr.io/geonet/base-images/centos:centos7 +# Install prerequisites +RUN curl -O https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz \ + && tar --strip-components 1 -xvf node-v* -C /usr/local \ + && yum install -y epel-release +# Update system +RUN yum update -y && \ + yum install -y autoconf automake boost boost-filesystem boost-iostreams \ + boost-program-options boost-regex boost-signals boost-system boost-thread \ + cairo cairo-devel createrepo fontconfig fontconfig-devel \ + freetype freetype-devel gcc gcc-c++ git libdbi libdbi-devel libgfortran \ + libxml2 libxml2-devel m2crypto make ncurses ncurses-devel numpy octave \ + openssl pango pango-devel perl-devel python3 qtwebkit rpm-build \ + rpmdevtools rpmlint rpm-sign shadow-utils systemd tar yum-utils