From f0ad3ea3ae89aac7d285089415fda689b74b5714 Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Fri, 10 Oct 2025 14:12:07 +0200 Subject: [PATCH 1/4] Remove mentions of RHEL 7 and update READMEs --- .../container-scripts/postgresql/README.md | 7 +++- .../container-scripts/postgresql/README.md | 14 +++---- .../container-scripts/postgresql/README.md | 12 +++--- .../container-scripts/postgresql/README.md | 12 +++--- README.md | 38 +++++++++---------- examples/enable-ssl/README.md | 2 +- test/run-openshift-pytest | 2 +- test/run_test | 10 ++--- 8 files changed, 48 insertions(+), 49 deletions(-) diff --git a/12/root/usr/share/container-scripts/postgresql/README.md b/12/root/usr/share/container-scripts/postgresql/README.md index 2b670b51..68eaa3e3 100644 --- a/12/root/usr/share/container-scripts/postgresql/README.md +++ b/12/root/usr/share/container-scripts/postgresql/README.md @@ -1,6 +1,9 @@ # PostgreSQL 12 SQL Database Server Container Image -This container image features the PostgreSQL 12 SQL database server, suitable for OpenShift and general applications. Users have the option to select from RHEL, CentOS Stream, and Fedora-based images. RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/), while CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg), and Fedora images can be accessed in [Quay.io](https://quay.io/organization/fedora). The resulting image can be executed using [podman](https://github.com/containers/libpod). +This container image features the PostgreSQL 12 SQL database server, suitable for OpenShift and general applications. +Only RHEL based images are available. +RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/). +The resulting image can be executed using [podman](https://github.com/containers/libpod). Please note that while the examples provided in this README utilize `podman`, it is possible to substitute any instance of `podman` with `docker` and the same arguments. `podman` can be installed with on Fedora with command `dnf install podman-docker`. @@ -224,4 +227,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, and the Fedora Dockerfile is named Dockerfile.fedora. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8. diff --git a/13/root/usr/share/container-scripts/postgresql/README.md b/13/root/usr/share/container-scripts/postgresql/README.md index a517159c..bfe538d5 100644 --- a/13/root/usr/share/container-scripts/postgresql/README.md +++ b/13/root/usr/share/container-scripts/postgresql/README.md @@ -1,6 +1,6 @@ # PostgreSQL 13 SQL Database Server Container Image -This container image features the PostgreSQL 13 SQL database server, suitable for OpenShift and general applications. Users have the option to select from RHEL, CentOS Stream, and Fedora-based images. RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/), while CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg), and Fedora images can be accessed in [Quay.io](https://quay.io/organization/fedora). The resulting image can be executed using [podman](https://github.com/containers/libpod). +This container image features the PostgreSQL 13 SQL database server, suitable for OpenShift and general applications. Users have the option to select from RHEL, CentOS Stream, and Fedora-based images. RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/), while CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg). The resulting image can be executed using [podman](https://github.com/containers/libpod). Please note that while the examples provided in this README utilize `podman`, it is possible to substitute any instance of `podman` with `docker` and the same arguments. `podman` can be installed with on Fedora with command `dnf install podman-docker`. @@ -10,10 +10,10 @@ This container image offers a containerized version of the PostgreSQL postgres d ## Usage -Assuming you are utilizing the `rhel8/postgresql-13` image, which is accessible via the `postgresql:13` imagestream tag in Openshift, the following steps outline usage. To set only the mandatory environment variables without storing the database in a host directory, execute this command: +Assuming you are utilizing the `rhel9/postgresql-13` image, which is accessible via the `postgresql:13` imagestream tag in Openshift, the following steps outline usage. To set only the mandatory environment variables without storing the database in a host directory, execute this command: ```bash -$ podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel8/postgresql-13 +$ podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel9/postgresql-13 ``` This command creates a container named `postgresql_database` running PostgreSQL with the database `db` and a user with the credentials `user:pass`. @@ -110,7 +110,7 @@ $ podman run -d --name postgresql_database \ -e POSTGRESQL_MIGRATION_REMOTE_HOST=172.17.0.2 \ -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=remoteAdminP@ssword \ [ OPTIONAL_CONFIGURATION_VARIABLES ] - rhel8/postgresql-13 + rhel9/postgresql-13 ``` The migration is performed using the **dump and restore** method (running `pg_dumpall` against the remote cluster and importing the dump locally using `psql`). The process is streamed (via a Unix pipeline), eliminating the need for intermediate dump files and conserving storage space. @@ -170,7 +170,7 @@ Data files are hard-linked from the old to the new data directory, providing per ## Extending Image -You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel8/postgresql-13` image, available via `postgresql:13` imagestream tag in Openshift. +You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel9/postgresql-13` image, available via `postgresql:13` imagestream tag in Openshift. To build a customized image `new-postgresql` with configuration from `https://github.com/sclorg/postgresql-container/tree/master/examples/extending-image`, run: @@ -186,7 +186,7 @@ $ oc new-app postgresql:13~https://github.com/sclorg/postgresql-container.git \ or via `s2i`: ``` -$ s2i build --context-dir examples/extending-image/ https://github.com/sclorg/postgresql-container.git rhel8/postgresql-13 new-postgresql +$ s2i build --context-dir examples/extending-image/ https://github.com/sclorg/postgresql-container.git rhel9/postgresql-13 new-postgresql ``` The directory passed to Openshift should contain one or more of the following directories: @@ -224,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, and the Fedora Dockerfile is named Dockerfile.fedora. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, and the CentOS Stream 9 Dockerfile is named Dockerfile.c9s. diff --git a/15/root/usr/share/container-scripts/postgresql/README.md b/15/root/usr/share/container-scripts/postgresql/README.md index 17897b15..438451f3 100644 --- a/15/root/usr/share/container-scripts/postgresql/README.md +++ b/15/root/usr/share/container-scripts/postgresql/README.md @@ -10,10 +10,10 @@ This container image offers a containerized version of the PostgreSQL postgres d ## Usage -Assuming you are utilizing the `rhel8/postgresql-15` image, which is accessible via the `postgresql:15` imagestream tag in Openshift, the following steps outline usage. To set only the mandatory environment variables without storing the database in a host directory, execute this command: +Assuming you are utilizing the `rhel9/postgresql-15` image, which is accessible via the `postgresql:15` imagestream tag in Openshift, the following steps outline usage. To set only the mandatory environment variables without storing the database in a host directory, execute this command: ```bash -$ podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel8/postgresql-15 +$ podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel9/postgresql-15 ``` This command creates a container named `postgresql_database` running PostgreSQL with the database `db` and a user with the credentials `user:pass`. @@ -110,7 +110,7 @@ $ podman run -d --name postgresql_database \ -e POSTGRESQL_MIGRATION_REMOTE_HOST=172.17.0.2 \ -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=remoteAdminP@ssword \ [ OPTIONAL_CONFIGURATION_VARIABLES ] - rhel8/postgresql-13 + rhel9/postgresql-15 ``` The migration is performed using the **dump and restore** method (running `pg_dumpall` against the remote cluster and importing the dump locally using `psql`). The process is streamed (via a Unix pipeline), eliminating the need for intermediate dump files and conserving storage space. @@ -170,7 +170,7 @@ Data files are hard-linked from the old to the new data directory, providing per ## Extending Image -You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel8/postgresql-15` image, available via `postgresql:15` imagestream tag in Openshift. +You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel9/postgresql-15` image, available via `postgresql:15` imagestream tag in Openshift. To build a customized image `new-postgresql` with configuration from `https://github.com/sclorg/postgresql-container/tree/master/examples/extending-image`, run: @@ -186,7 +186,7 @@ $ oc new-app postgresql:15~https://github.com/sclorg/postgresql-container.git \ or via `s2i`: ``` -$ s2i build --context-dir examples/extending-image/ https://github.com/sclorg/postgresql-container.git rhel8/postgresql-15 new-postgresql +$ s2i build --context-dir examples/extending-image/ https://github.com/sclorg/postgresql-container.git rhel9/postgresql-15 new-postgresql ``` The directory passed to Openshift should contain one or more of the following directories: @@ -224,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, and the Fedora Dockerfile is named Dockerfile.fedora. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, and the CentOS Stream 9 Dockerfile is named Dockerfile.c9s. diff --git a/16/root/usr/share/container-scripts/postgresql/README.md b/16/root/usr/share/container-scripts/postgresql/README.md index b33442fd..ad899616 100644 --- a/16/root/usr/share/container-scripts/postgresql/README.md +++ b/16/root/usr/share/container-scripts/postgresql/README.md @@ -10,10 +10,10 @@ This container image offers a containerized version of the PostgreSQL postgres d ## Usage -Assuming you are utilizing the `` image, which is accessible via the `postgresql:16` imagestream tag in Openshift, the following steps outline usage. To set only the mandatory environment variables without storing the database in a host directory, execute this command: +Assuming you are utilizing the `rhel10/postgresql-16` image, which is accessible via the `postgresql:16` imagestream tag in Openshift, the following steps outline usage. To set only the mandatory environment variables without storing the database in a host directory, execute this command: ```bash -$ podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 +$ podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel10/postgresql-16 ``` This command creates a container named `postgresql_database` running PostgreSQL with the database `db` and a user with the credentials `user:pass`. @@ -110,7 +110,7 @@ $ podman run -d --name postgresql_database \ -e POSTGRESQL_MIGRATION_REMOTE_HOST=172.17.0.2 \ -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=remoteAdminP@ssword \ [ OPTIONAL_CONFIGURATION_VARIABLES ] - rhel8/postgresql-13 + rhel10/postgresql-16 ``` The migration is performed using the **dump and restore** method (running `pg_dumpall` against the remote cluster and importing the dump locally using `psql`). The process is streamed (via a Unix pipeline), eliminating the need for intermediate dump files and conserving storage space. @@ -170,7 +170,7 @@ Data files are hard-linked from the old to the new data directory, providing per ## Extending Image -You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `` image, available via `postgresql:16` imagestream tag in Openshift. +You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel10-postgresql-16` image, available via `postgresql:16` imagestream tag in Openshift. To build a customized image `new-postgresql` with configuration from `https://github.com/sclorg/postgresql-container/tree/master/examples/extending-image`, run: @@ -186,7 +186,7 @@ $ oc new-app postgresql:16~https://github.com/sclorg/postgresql-container.git \ or via `s2i`: ``` -$ s2i build --context-dir examples/extending-image/ https://github.com/sclorg/postgresql-container.git new-postgresql +$ s2i build --context-dir examples/extending-image/ https://github.com/sclorg/postgresql-container.git rhel10/postgresql-16 new-postgresql ``` The directory passed to Openshift should contain one or more of the following directories: @@ -224,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, and the Fedora Dockerfile is named Dockerfile.fedora. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, the CentOS Stream 9 Dockerfile is named Dockerfile.c9s, the CentOS Stream 10 Dockerfile is named Dockerfile.c10s, and the Fedora Dockerfile is named Dockerfile.fedora. diff --git a/README.md b/README.md index 4c317745..7d9f8a81 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,10 @@ Images available on Quay.io are: - CentOS Stream 9 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c9s) - CentOS Stream 9 [postgresql-15](https://quay.io/repository/sclorg/postgresql-15-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) -- Fedora [postgresql-14](https://quay.io/repository/fedora/postgresql-14) +- CentOS Stream 9 [postgresql-16](https://quay.io/repository/sclorg/postgresql-16-c9s) +- CentOS Stream 10 [postgresql-16](https://quay.io/repository/sclorg/postgresql-16-c10s) - Fedora [postgresql-15](https://quay.io/repository/fedora/postgresql-15) +- Fedora [postgresql-16](https://quay.io/repository/fedora/postgresql-16) This repository provides Dockerfiles for PostgreSQL container images, optimized for use with OpenShift. These images are available in RHEL, Fedora, and CentOS-based variants. @@ -25,44 +24,45 @@ PostgreSQL versions currently supported are: - [postgresql-12](https://github.com/sclorg/postgresql-container/tree/master/12) - [postgresql-13](https://github.com/sclorg/postgresql-container/tree/master/13) -- [postgresql-14](https://github.com/sclorg/postgresql-container/tree/master/14) - [postgresql-15](https://github.com/sclorg/postgresql-container/tree/master/15) +- [postgresql-16](https://github.com/sclorg/postgresql-container/tree/master/16) RHEL versions currently supported are: - RHEL8 - RHEL9 - RHEL10 -CentOS versions currently supported are: +CentOS Stream versions currently supported are: - CentOS Stream 9 +- CentOS Stream 10 ## Installation -Choose either the CentOS Stream 9 or RHEL9-based image: +Choose either the CentOS Stream or RHEL-based image: -- **RHEL9 based image** +- **RHEL based image** - These images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.access.redhat.com/rhel9/postgresql-13). + These images are available in the [Red Hat Container Catalog](https://catalog.redhat.com/en/search?searchType=containers). To download the image, execute the following command: ```bash - podman pull registry.redhat.io/rhel9/postgresql-13 + podman pull registry.redhat.io/rhel10/postgresql-16 ``` - To build a RHEL9-based image, ensure you run Docker build on a RHEL machine with a valid subscription. + To build a RHEL-based image, ensure you run Docker build on a RHEL machine with a valid subscription. ```bash $ git clone --recursive https://github.com/sclorg/postgresql-container.git $ cd postgresql - $ make build TARGET=rhel9 VERSIONS=13 + $ make build TARGET=rhel10 VERSIONS=16 ``` -- **CentOS Stream 9 based image** +- **CentOS Stream based image** These images are available on Quay.io. To download the image, execute the following command: ```bash - $ podman pull https://quay.io/repository/sclorg/postgresql-13-c9s + $ podman pull https://quay.io/repository/sclorg/postgresql-16-c10s ``` To build a PostgreSQL image from scratch, perform the following steps: @@ -70,7 +70,7 @@ Choose either the CentOS Stream 9 or RHEL9-based image: ```bash $ git clone --recursive https://github.com/sclorg/postgresql-container.git $ cd postgresql - $ make build TARGET=c9s VERSIONS=13 + $ make build TARGET=c10s VERSIONS=16 ``` Note: While the installation steps utilize `podman`, you can substitute these calls with `docker` with the same arguments. @@ -101,8 +101,8 @@ For detailed information on the usage of specific PostgreSQL Dockerfiles, please - [PostgreSQL 12 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/12) - [PostgreSQL 13 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/13) -- [PostgreSQL 14 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/14) - [PostgreSQL 15 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/15) +- [PostgreSQL 16 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/16) For unsupported versions, you may refer to: @@ -119,21 +119,21 @@ This repository includes a testing framework that verifies the basic functionali ```bash $ cd postgresql - $ make test TARGET=rhel9 VERSIONS=13 + $ make test TARGET=rhel10 VERSIONS=16 ``` - **CentOS Stream-based image** ```bash $ cd postgresql - $ make test TARGET=c9s VERSIONS=13 + $ make test TARGET=c10s VERSIONS=16 ``` - To run a specific subset of test cases, use the `TESTS` parameter: ```bash $ cd postgresql - $ make test VERSIONS=13 TESTS="run_general_tests run_replication_test" + $ make test VERSIONS=16 TESTS="run_general_tests run_replication_test" ``` **Note: By omitting the `VERSIONS` parameter, the build/test action will be performed on all provided versions of PostgreSQL.** diff --git a/examples/enable-ssl/README.md b/examples/enable-ssl/README.md index 4d9e6204..b297d88d 100644 --- a/examples/enable-ssl/README.md +++ b/examples/enable-ssl/README.md @@ -12,7 +12,7 @@ In this example, we will assume that you are using OpenShift. Suppose you do not You should use your configuration for `myUser`, `myPassword` and `myDB` ```bash -oc new-app --name psql-ssl postgresql:13-el7~https://github.com/sclorg/postgresql-container.git \ +oc new-app --name psql-ssl postgresql:16-el10~https://github.com/sclorg/postgresql-container.git \ --context-dir examples/enable-ssl \ -e POSTGRESQL_USER=myUser \ -e POSTGRESQL_PASSWORD=myPassword \ diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index e619157e..df843e0c 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -3,7 +3,7 @@ # IMAGE_NAME specifies a name of the candidate image used for testing. # The image has to be available before this script is executed. # VERSION specifies the major version of the MariaDB in format of X.Y -# OS specifies RHEL version (e.g. OS=rhel7) +# OS specifies RHEL version (e.g. OS=rhel8) # THISDIR=$(dirname ${BASH_SOURCE[0]}) diff --git a/test/run_test b/test/run_test index 98e9fdb2..edae43f2 100755 --- a/test/run_test +++ b/test/run_test @@ -68,13 +68,9 @@ function cleanup() { ct_path_foreach "$volumes_to_clean" cleanup_volume_dir - if test -n "${images_to_clean-}"; then - # Workaround for RHEL 7 bash bug: - # https://bugzilla.redhat.com/show_bug.cgi?id=1636393 - for image in "${images_to_clean[@]}"; do - docker rmi -f "$image" - done - fi + for image in "${images_to_clean[@]}"; do + docker rmi -f "$image" + done ct_path_foreach "$files_to_clean" rm From 674dd35bba165198eff807f2a780a70a122919ad Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Fri, 10 Oct 2025 14:12:28 +0200 Subject: [PATCH 2/4] Remove scl_enable --- 12/root/usr/libexec/check-container | 2 -- 12/root/usr/share/container-scripts/postgresql/scl_enable | 3 --- 13/root/usr/libexec/check-container | 2 -- 13/root/usr/share/container-scripts/postgresql/scl_enable | 3 --- 15/root/usr/libexec/check-container | 2 -- 15/root/usr/share/container-scripts/postgresql/scl_enable | 3 --- 16/root/usr/libexec/check-container | 2 -- 16/root/usr/share/container-scripts/postgresql/scl_enable | 3 --- 8 files changed, 20 deletions(-) delete mode 100644 12/root/usr/share/container-scripts/postgresql/scl_enable delete mode 100644 13/root/usr/share/container-scripts/postgresql/scl_enable delete mode 100644 15/root/usr/share/container-scripts/postgresql/scl_enable delete mode 100644 16/root/usr/share/container-scripts/postgresql/scl_enable diff --git a/12/root/usr/libexec/check-container b/12/root/usr/libexec/check-container index 04a5b625..673e96ec 100755 --- a/12/root/usr/libexec/check-container +++ b/12/root/usr/libexec/check-container @@ -7,8 +7,6 @@ # wait for it (this script might run forever, we expect that the timeout is # maintained externally). -test -z "$ENABLED_COLLECTIONS" || . scl_source enable $ENABLED_COLLECTIONS - if test x"$1" = "x--live"; then # Since livenessProbe is about to detect container deadlocks, and we # so far don't know about real deadlocks to be detected -- we keep diff --git a/12/root/usr/share/container-scripts/postgresql/scl_enable b/12/root/usr/share/container-scripts/postgresql/scl_enable deleted file mode 100644 index 1d967f9b..00000000 --- a/12/root/usr/share/container-scripts/postgresql/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable $ENABLED_COLLECTIONS diff --git a/13/root/usr/libexec/check-container b/13/root/usr/libexec/check-container index 04a5b625..673e96ec 100755 --- a/13/root/usr/libexec/check-container +++ b/13/root/usr/libexec/check-container @@ -7,8 +7,6 @@ # wait for it (this script might run forever, we expect that the timeout is # maintained externally). -test -z "$ENABLED_COLLECTIONS" || . scl_source enable $ENABLED_COLLECTIONS - if test x"$1" = "x--live"; then # Since livenessProbe is about to detect container deadlocks, and we # so far don't know about real deadlocks to be detected -- we keep diff --git a/13/root/usr/share/container-scripts/postgresql/scl_enable b/13/root/usr/share/container-scripts/postgresql/scl_enable deleted file mode 100644 index 1d967f9b..00000000 --- a/13/root/usr/share/container-scripts/postgresql/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable $ENABLED_COLLECTIONS diff --git a/15/root/usr/libexec/check-container b/15/root/usr/libexec/check-container index 04a5b625..673e96ec 100755 --- a/15/root/usr/libexec/check-container +++ b/15/root/usr/libexec/check-container @@ -7,8 +7,6 @@ # wait for it (this script might run forever, we expect that the timeout is # maintained externally). -test -z "$ENABLED_COLLECTIONS" || . scl_source enable $ENABLED_COLLECTIONS - if test x"$1" = "x--live"; then # Since livenessProbe is about to detect container deadlocks, and we # so far don't know about real deadlocks to be detected -- we keep diff --git a/15/root/usr/share/container-scripts/postgresql/scl_enable b/15/root/usr/share/container-scripts/postgresql/scl_enable deleted file mode 100644 index 1d967f9b..00000000 --- a/15/root/usr/share/container-scripts/postgresql/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable $ENABLED_COLLECTIONS diff --git a/16/root/usr/libexec/check-container b/16/root/usr/libexec/check-container index 04a5b625..673e96ec 100755 --- a/16/root/usr/libexec/check-container +++ b/16/root/usr/libexec/check-container @@ -7,8 +7,6 @@ # wait for it (this script might run forever, we expect that the timeout is # maintained externally). -test -z "$ENABLED_COLLECTIONS" || . scl_source enable $ENABLED_COLLECTIONS - if test x"$1" = "x--live"; then # Since livenessProbe is about to detect container deadlocks, and we # so far don't know about real deadlocks to be detected -- we keep diff --git a/16/root/usr/share/container-scripts/postgresql/scl_enable b/16/root/usr/share/container-scripts/postgresql/scl_enable deleted file mode 100644 index 1d967f9b..00000000 --- a/16/root/usr/share/container-scripts/postgresql/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable $ENABLED_COLLECTIONS From a5e9b0f62480a7bef8de5c70ad0a8609d30c7807 Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Mon, 13 Oct 2025 16:39:06 +0200 Subject: [PATCH 3/4] Update dist-gen files to generate desired results --- 12/root/usr/share/container-scripts/postgresql/README.md | 9 +++------ 13/root/usr/share/container-scripts/postgresql/README.md | 4 ++-- 15/root/usr/share/container-scripts/postgresql/README.md | 2 +- 16/root/usr/share/container-scripts/postgresql/README.md | 2 +- manifest.yml | 3 --- specs/multispec.yml | 8 +++++--- src/root/usr/libexec/check-container | 2 -- .../usr/share/container-scripts/postgresql/README.md | 4 ++-- 8 files changed, 14 insertions(+), 20 deletions(-) diff --git a/12/root/usr/share/container-scripts/postgresql/README.md b/12/root/usr/share/container-scripts/postgresql/README.md index 68eaa3e3..2c61b99f 100644 --- a/12/root/usr/share/container-scripts/postgresql/README.md +++ b/12/root/usr/share/container-scripts/postgresql/README.md @@ -1,9 +1,6 @@ # PostgreSQL 12 SQL Database Server Container Image -This container image features the PostgreSQL 12 SQL database server, suitable for OpenShift and general applications. -Only RHEL based images are available. -RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/). -The resulting image can be executed using [podman](https://github.com/containers/libpod). +This container image features the PostgreSQL 12 SQL database server, suitable for OpenShift and general applications. Users have the option to select from RHEL, CentOS Stream, and Fedora-based images. RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/), while CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg), and Fedora images can be accessed in [Quay.io](https://quay.io/organization/fedora). The resulting image can be executed using [podman](https://github.com/containers/libpod). Please note that while the examples provided in this README utilize `podman`, it is possible to substitute any instance of `podman` with `docker` and the same arguments. `podman` can be installed with on Fedora with command `dnf install podman-docker`. @@ -113,7 +110,7 @@ $ podman run -d --name postgresql_database \ -e POSTGRESQL_MIGRATION_REMOTE_HOST=172.17.0.2 \ -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=remoteAdminP@ssword \ [ OPTIONAL_CONFIGURATION_VARIABLES ] - rhel8/postgresql-13 + rhel8/postgresql-12 ``` The migration is performed using the **dump and restore** method (running `pg_dumpall` against the remote cluster and importing the dump locally using `psql`). The process is streamed (via a Unix pipeline), eliminating the need for intermediate dump files and conserving storage space. @@ -227,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, the CentOS Stream 9 Dockerfile is named Dockerfile.c9s, the CentOS Stream 10 Dockerfile is named Dockerfile.c10s, and the Fedora Dockerfile is named Dockerfile.fedora. diff --git a/13/root/usr/share/container-scripts/postgresql/README.md b/13/root/usr/share/container-scripts/postgresql/README.md index bfe538d5..6a850a19 100644 --- a/13/root/usr/share/container-scripts/postgresql/README.md +++ b/13/root/usr/share/container-scripts/postgresql/README.md @@ -1,6 +1,6 @@ # PostgreSQL 13 SQL Database Server Container Image -This container image features the PostgreSQL 13 SQL database server, suitable for OpenShift and general applications. Users have the option to select from RHEL, CentOS Stream, and Fedora-based images. RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/), while CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg). The resulting image can be executed using [podman](https://github.com/containers/libpod). +This container image features the PostgreSQL 13 SQL database server, suitable for OpenShift and general applications. Users have the option to select from RHEL, CentOS Stream, and Fedora-based images. RHEL images can be found in the [Red Hat Container Catalog](https://access.redhat.com/containers/), while CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg), and Fedora images can be accessed in [Quay.io](https://quay.io/organization/fedora). The resulting image can be executed using [podman](https://github.com/containers/libpod). Please note that while the examples provided in this README utilize `podman`, it is possible to substitute any instance of `podman` with `docker` and the same arguments. `podman` can be installed with on Fedora with command `dnf install podman-docker`. @@ -224,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, and the CentOS Stream 9 Dockerfile is named Dockerfile.c9s. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, the CentOS Stream 9 Dockerfile is named Dockerfile.c9s, the CentOS Stream 10 Dockerfile is named Dockerfile.c10s, and the Fedora Dockerfile is named Dockerfile.fedora. diff --git a/15/root/usr/share/container-scripts/postgresql/README.md b/15/root/usr/share/container-scripts/postgresql/README.md index 438451f3..3c49ed39 100644 --- a/15/root/usr/share/container-scripts/postgresql/README.md +++ b/15/root/usr/share/container-scripts/postgresql/README.md @@ -224,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, and the CentOS Stream 9 Dockerfile is named Dockerfile.c9s. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, the CentOS Stream 9 Dockerfile is named Dockerfile.c9s, the CentOS Stream 10 Dockerfile is named Dockerfile.c10s, and the Fedora Dockerfile is named Dockerfile.fedora. diff --git a/16/root/usr/share/container-scripts/postgresql/README.md b/16/root/usr/share/container-scripts/postgresql/README.md index ad899616..1ae5a521 100644 --- a/16/root/usr/share/container-scripts/postgresql/README.md +++ b/16/root/usr/share/container-scripts/postgresql/README.md @@ -170,7 +170,7 @@ Data files are hard-linked from the old to the new data directory, providing per ## Extending Image -You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel10-postgresql-16` image, available via `postgresql:16` imagestream tag in Openshift. +You can extend this image in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://github.com/openshift/source-to-image) application (where available). For this example, assume that you are using the `rhel10/postgresql-16` image, available via `postgresql:16` imagestream tag in Openshift. To build a customized image `new-postgresql` with configuration from `https://github.com/sclorg/postgresql-container/tree/master/examples/extending-image`, run: diff --git a/manifest.yml b/manifest.yml index de712638..d9acfee5 100644 --- a/manifest.yml +++ b/manifest.yml @@ -51,9 +51,6 @@ COPY_RULES: - src: src/root/usr/share/container-scripts/postgresql/openshift-custom-postgresql.conf.template dest: root/usr/share/container-scripts/postgresql/openshift-custom-postgresql.conf.template - - src: src/root/usr/share/container-scripts/postgresql/scl_enable - dest: root/usr/share/container-scripts/postgresql/scl_enable - - src: src/root/usr/bin/run-postgresql dest: root/usr/bin/run-postgresql mode: "0755" diff --git a/specs/multispec.yml b/specs/multispec.yml index 70ddfd85..d61fe7fb 100644 --- a/specs/multispec.yml +++ b/specs/multispec.yml @@ -104,7 +104,7 @@ specs: prev_short: "12" common_image_name: "{{ spec.org }}/postgresql-{{ spec.short }}-{{ spec.prod }}" c9s_image_name: "sclorg/postgresql-{{ spec.short }}-c9s" - rhel_image_name: "rhel8/postgresql-{{ spec.short }}" + rhel_image_name: "rhel9/postgresql-{{ spec.short }}" latest_fedora: "f38" "15": @@ -113,7 +113,8 @@ specs: short: "15" prev_short: "13" common_image_name: "{{ spec.org }}/postgresql-{{ spec.short }}-{{ spec.prod }}" - rhel_image_name: "rhel8/postgresql-{{ spec.short }}" + c9s_image_name: "sclorg/postgresql-{{ spec.short }}-c9s" + rhel_image_name: "rhel9/postgresql-{{ spec.short }}" latest_fedora: "f40" "16": @@ -122,7 +123,8 @@ specs: short: "16" prev_short: "15" common_image_name: "{{ spec.org }}/postgresql-{{ spec.short }}-{{ spec.prod }}" - c9s_image_name: "sclorg/postgresql-{{ spec.short }}-c9s" + c9s_image_name: "sclorg/postgresql-{{ spec.short }}-c10s" + rhel_image_name: "rhel10/postgresql-{{ spec.short }}" latest_fedora: "f40" diff --git a/src/root/usr/libexec/check-container b/src/root/usr/libexec/check-container index 04a5b625..673e96ec 100755 --- a/src/root/usr/libexec/check-container +++ b/src/root/usr/libexec/check-container @@ -7,8 +7,6 @@ # wait for it (this script might run forever, we expect that the timeout is # maintained externally). -test -z "$ENABLED_COLLECTIONS" || . scl_source enable $ENABLED_COLLECTIONS - if test x"$1" = "x--live"; then # Since livenessProbe is about to detect container deadlocks, and we # so far don't know about real deadlocks to be detected -- we keep diff --git a/src/root/usr/share/container-scripts/postgresql/README.md b/src/root/usr/share/container-scripts/postgresql/README.md index 87943d94..e2421d46 100644 --- a/src/root/usr/share/container-scripts/postgresql/README.md +++ b/src/root/usr/share/container-scripts/postgresql/README.md @@ -110,7 +110,7 @@ $ podman run -d --name postgresql_database \ -e POSTGRESQL_MIGRATION_REMOTE_HOST=172.17.0.2 \ -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=remoteAdminP@ssword \ [ OPTIONAL_CONFIGURATION_VARIABLES ] - rhel8/postgresql-13 + {{ spec.rhel_image_name }} ``` The migration is performed using the **dump and restore** method (running `pg_dumpall` against the remote cluster and importing the dump locally using `psql`). The process is streamed (via a Unix pipeline), eliminating the need for intermediate dump files and conserving storage space. @@ -224,4 +224,4 @@ Subsequently, log output is redirected to the logging collector process and will ## Additional Resources -The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, and the Fedora Dockerfile is named Dockerfile.fedora. +The Dockerfile and other sources related to this container image can be found at https://github.com/sclorg/postgresql-container. In this repository, the RHEL8 Dockerfile is named Dockerfile.rhel8, the RHEL9 Dockerfile is named Dockerfile.rhel9, the RHEL10 Dockerfile is named Dockerfile.rhel10, the CentOS Stream 9 Dockerfile is named Dockerfile.c9s, the CentOS Stream 10 Dockerfile is named Dockerfile.c10s, and the Fedora Dockerfile is named Dockerfile.fedora. From 23a930fd010d0a4f112a4c992e250e9f4df29c9e Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Mon, 20 Oct 2025 10:07:02 +0200 Subject: [PATCH 4/4] Removed scl_enable from src and the pre_build_distgen hook --- hooks/pre_build_distgen | 8 -------- .../usr/share/container-scripts/postgresql/scl_enable | 3 --- 2 files changed, 11 deletions(-) delete mode 100755 hooks/pre_build_distgen delete mode 100644 src/root/usr/share/container-scripts/postgresql/scl_enable diff --git a/hooks/pre_build_distgen b/hooks/pre_build_distgen deleted file mode 100755 index bbbde12d..00000000 --- a/hooks/pre_build_distgen +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -ex -yum install epel-release -y -# our deps -yum install distgen make -y - -# common.mk lives in submodule, init first -git submodule update --init -make TARGET=centos7 generate diff --git a/src/root/usr/share/container-scripts/postgresql/scl_enable b/src/root/usr/share/container-scripts/postgresql/scl_enable deleted file mode 100644 index 1d967f9b..00000000 --- a/src/root/usr/share/container-scripts/postgresql/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable $ENABLED_COLLECTIONS