From c6b749b6d1cef67e8bf0b0973c5ccac0d28d8522 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 23 Jun 2022 14:38:04 +0200 Subject: [PATCH 1/3] Add the latest container-common-scripts Signed-off-by: Petr "Stone" Hracek --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 2269a3ec..93fb9c19 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 2269a3ec3d32410d34807b847728520b601bdfcd +Subproject commit 93fb9c196b26e18a8de6f0b16702bc0afa7cc744 From a02affdd32b9ddbdbf273678100f29814ba14791 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 23 Jun 2022 14:38:26 +0200 Subject: [PATCH 2/3] Add support for building and testing postgresql-13 on RHEL9 host Signed-off-by: Petr "Stone" Hracek --- manifest.sh | 3 +++ specs/multispec.yml | 18 ++++++++++++++++++ src/Dockerfile | 6 +++--- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/manifest.sh b/manifest.sh index ee8c1c79..05a1adc1 100644 --- a/manifest.sh +++ b/manifest.sh @@ -38,6 +38,9 @@ DISTGEN_MULTI_RULES=" src=src/Dockerfile dest=Dockerfile.rhel8; + src=src/Dockerfile + dest=Dockerfile.rhel9; + src=src/Dockerfile dest=Dockerfile.c9s; diff --git a/specs/multispec.yml b/specs/multispec.yml index ccbd6706..c61a5814 100644 --- a/specs/multispec.yml +++ b/specs/multispec.yml @@ -51,6 +51,20 @@ specs: yum -y module enable postgresql:{{ spec.version }} && \ post_install: >-4 yum -y reinstall tzdata && \ + rhel9: + distros: + - rhel-9-x86_64 + s2i_base: ubi9/s2i-core + org: "rhel9" + prod: "rhel9" + openshift_tags: "database,postgresql,postgresql{{ spec.short }},postgresql-{{ spec.short }}" + redhat_component: "postgresql-{{ spec.short }}-container" + img_name: "{{ spec.org }}/postgresql-{{ spec.short }}" + pkgs: "postgresql-server postgresql-contrib" + environment_setup: >-4 + yum -y install postgresql && \ + post_install: >-4 + yum -y reinstall tzdata && \ c9s: distros: - centos-stream-9-x86_64 @@ -147,17 +161,20 @@ matrix: - rhel-7-x86_64 - centos-7-x86_64 - rhel-8-x86_64 + - rhel-9-x86_64 - centos-stream-8-x86_64 - centos-stream-9-x86_64 version: "9.6" - distros: - fedora-31-x86_64 - fedora-34-x86_64 + - rhel-9-x86_64 - centos-stream-9-x86_64 version: "10" - distros: - rhel-7-x86_64 - rhel-8-x86_64 + - rhel-9-x86_64 - centos-7-x86_64 - fedora-34-x86_64 - centos-stream-8-x86_64 @@ -165,6 +182,7 @@ matrix: version: "11" - distros: - rhel-8-x86_64 + - rhel-9-x86_64 - fedora-34-x86_64 - centos-stream-8-x86_64 - centos-stream-9-x86_64 diff --git a/src/Dockerfile b/src/Dockerfile index 198ed393..13cc091f 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -11,7 +11,7 @@ FROM {{ spec.s2i_base }} # PostgreSQL administrative account ENV POSTGRESQL_VERSION={{ spec.version }} \ - {% if spec.prod != "rhel8" or spec.version == "10" %} + {% if spec.prod != "rhel8" or spec.prod != "rhel9" or spec.version == "10" %} POSTGRESQL_PREV_VERSION={{ spec.prev_version }} \ {% endif %} HOME=/var/lib/pgsql \ @@ -73,7 +73,7 @@ RUN {{ spec.environment_setup }} {% if spec.version not in ["9.6", "10", "11"] %} {% if spec.prod == 'rhel7' or spec.prod == 'centos7' %} INSTALL_PKGS="$INSTALL_PKGS rh-postgresql{{ spec.short }}-pgaudit" && \ - {% elif spec.prod == 'rhel8' or spec.prod == 'c9s' or spec.prod == 'c8s' %} + {% elif spec.prod == 'rhel8' or spec.prod == 'rhel9' or spec.prod == 'c9s' or spec.prod == 'c8s' %} INSTALL_PKGS="$INSTALL_PKGS pgaudit" && \ {% endif %} {% endif %} @@ -95,7 +95,7 @@ ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \ COPY root / COPY ./s2i/bin/ $STI_SCRIPTS_PATH -{% if spec.prod != "rhel8" and config.os.id != "fedora" and spec.prod != "c8s" and spec.prod != "c9s" %} +{% if spec.prod != "rhel8" and spec.prod != "rhel9" and config.os.id != "fedora" and spec.prod != "c8s" and spec.prod != "c9s" %} # When bash is started non-interactively, to run a shell script, for example it # looks for this variable and source the content of this file. This will enable # the SCL for all scripts without need to do 'scl enable'. From 76c8e48aef0c2650d8c8567b9981dfe6f5c14c68 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 23 Jun 2022 14:39:02 +0200 Subject: [PATCH 3/3] Update documentation Signed-off-by: Petr "Stone" Hracek --- README.md | 14 ++++++++++++++ .../share/container-scripts/postgresql/README.md | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 56f3808c..d1d4f996 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,17 @@ PostgreSQL container images [![Build and push images to Quay.io registry](https://github.com/sclorg/postgresql-container/actions/workflows/build-and-push.yml/badge.svg)](https://github.com/sclorg/postgresql-container/actions/workflows/build-and-push.yml) +Images available on Quay are: +* CentOS 7 [postgresql-10](https://quay.io/repository/centos7/postgresql-10-centos7) +* CentOS 7 [postgresql-12](https://quay.io/repository/centos7/postgresql-12-centos7) +* CentOS 7 [postgresql-13](https://quay.io/repository/centos7/postgresql-13-centos7) +* CentOS Stream 8 [postgresql-10](https://quay.io/repository/sclorg/postgresql-10-c8s) +* CentOS Stream 8 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c8s) +* CentOS Stream 9 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c9s) +* Fedora [postgresql-11](https://quay.io/repository/fedora/postgresql-11) +* Fedora [postgresql-12](https://quay.io/repository/fedora/postgresql-12) +* Fedora [postgresql-13](https://quay.io/repository/fedora/postgresql-13) + This repository contains Dockerfiles for PostgreSQL images for OpenShift. Users can choose between RHEL, Fedora and CentOS based images. @@ -25,9 +36,12 @@ PostgreSQL versions currently supported are: RHEL versions currently supported are: * RHEL7 * RHEL8 +* RHEL9 CentOS versions currently supported are: * CentOS7 +* CentOS Stream 8 +* CentOS Stream 9 Installation diff --git a/src/root/usr/share/container-scripts/postgresql/README.md b/src/root/usr/share/container-scripts/postgresql/README.md index bc01aa9f..0897414e 100644 --- a/src/root/usr/share/container-scripts/postgresql/README.md +++ b/src/root/usr/share/container-scripts/postgresql/README.md @@ -5,7 +5,7 @@ This container image includes PostgreSQL {{ spec.version }} SQL database server Users can choose between RHEL, CentOS and Fedora based images. The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/), the CentOS images are available on [Quay.io](https://quay.io/organization/centos7), -and the Fedora images are available in [Fedora Registry](https://registry.fedoraproject.org/). +and the Fedora images are available in [Quay.io](https://quay.io/organization/fedora). The resulting image can be run using [podman](https://github.com/containers/libpod). Note: while the examples in this README are calling `podman`, you can replace any such calls by `docker` with the same arguments @@ -327,4 +327,5 @@ Dockerfile and other sources for this container image are available on https://github.com/sclorg/postgresql-container. In that repository, the Dockerfile for CentOS is called Dockerfile, the Dockerfile for RHEL7 is called Dockerfile.rhel7, the Dockerfile for RHEL8 is called Dockerfile.rhel8, +the Dockerfile for RHEL9 is called Dockerfile.rhel9, and the Dockerfile for Fedora is called Dockerfile.fedora.