Skip to content

Commit e2af401

Browse files
authored
Merge pull request #453 from sclorg/support_building_testing_rhel9
Support building testing postgresql-13 on RHEL9 host
2 parents 52a2c50 + 76c8e48 commit e2af401

File tree

6 files changed

+41
-5
lines changed

6 files changed

+41
-5
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ PostgreSQL container images
33

44
[![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)
55

6+
Images available on Quay are:
7+
* CentOS 7 [postgresql-10](https://quay.io/repository/centos7/postgresql-10-centos7)
8+
* CentOS 7 [postgresql-12](https://quay.io/repository/centos7/postgresql-12-centos7)
9+
* CentOS 7 [postgresql-13](https://quay.io/repository/centos7/postgresql-13-centos7)
10+
* CentOS Stream 8 [postgresql-10](https://quay.io/repository/sclorg/postgresql-10-c8s)
11+
* CentOS Stream 8 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c8s)
12+
* CentOS Stream 9 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c9s)
13+
* Fedora [postgresql-11](https://quay.io/repository/fedora/postgresql-11)
14+
* Fedora [postgresql-12](https://quay.io/repository/fedora/postgresql-12)
15+
* Fedora [postgresql-13](https://quay.io/repository/fedora/postgresql-13)
16+
617
This repository contains Dockerfiles for PostgreSQL images for OpenShift.
718
Users can choose between RHEL, Fedora and CentOS based images.
819

@@ -25,9 +36,12 @@ PostgreSQL versions currently supported are:
2536
RHEL versions currently supported are:
2637
* RHEL7
2738
* RHEL8
39+
* RHEL9
2840

2941
CentOS versions currently supported are:
3042
* CentOS7
43+
* CentOS Stream 8
44+
* CentOS Stream 9
3145

3246

3347
Installation

common

manifest.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ DISTGEN_MULTI_RULES="
3838
src=src/Dockerfile
3939
dest=Dockerfile.rhel8;
4040
41+
src=src/Dockerfile
42+
dest=Dockerfile.rhel9;
43+
4144
src=src/Dockerfile
4245
dest=Dockerfile.c9s;
4346

specs/multispec.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ specs:
5151
yum -y module enable postgresql:{{ spec.version }} && \
5252
post_install: >-4
5353
yum -y reinstall tzdata && \
54+
rhel9:
55+
distros:
56+
- rhel-9-x86_64
57+
s2i_base: ubi9/s2i-core
58+
org: "rhel9"
59+
prod: "rhel9"
60+
openshift_tags: "database,postgresql,postgresql{{ spec.short }},postgresql-{{ spec.short }}"
61+
redhat_component: "postgresql-{{ spec.short }}-container"
62+
img_name: "{{ spec.org }}/postgresql-{{ spec.short }}"
63+
pkgs: "postgresql-server postgresql-contrib"
64+
environment_setup: >-4
65+
yum -y install postgresql && \
66+
post_install: >-4
67+
yum -y reinstall tzdata && \
5468
c9s:
5569
distros:
5670
- centos-stream-9-x86_64
@@ -147,24 +161,28 @@ matrix:
147161
- rhel-7-x86_64
148162
- centos-7-x86_64
149163
- rhel-8-x86_64
164+
- rhel-9-x86_64
150165
- centos-stream-8-x86_64
151166
- centos-stream-9-x86_64
152167
version: "9.6"
153168
- distros:
154169
- fedora-31-x86_64
155170
- fedora-34-x86_64
171+
- rhel-9-x86_64
156172
- centos-stream-9-x86_64
157173
version: "10"
158174
- distros:
159175
- rhel-7-x86_64
160176
- rhel-8-x86_64
177+
- rhel-9-x86_64
161178
- centos-7-x86_64
162179
- fedora-34-x86_64
163180
- centos-stream-8-x86_64
164181
- centos-stream-9-x86_64
165182
version: "11"
166183
- distros:
167184
- rhel-8-x86_64
185+
- rhel-9-x86_64
168186
- fedora-34-x86_64
169187
- centos-stream-8-x86_64
170188
- centos-stream-9-x86_64

src/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ FROM {{ spec.s2i_base }}
1111
# PostgreSQL administrative account
1212

1313
ENV POSTGRESQL_VERSION={{ spec.version }} \
14-
{% if spec.prod != "rhel8" or spec.version == "10" %}
14+
{% if spec.prod != "rhel8" or spec.prod != "rhel9" or spec.version == "10" %}
1515
POSTGRESQL_PREV_VERSION={{ spec.prev_version }} \
1616
{% endif %}
1717
HOME=/var/lib/pgsql \
@@ -73,7 +73,7 @@ RUN {{ spec.environment_setup }}
7373
{% if spec.version not in ["9.6", "10", "11"] %}
7474
{% if spec.prod == 'rhel7' or spec.prod == 'centos7' %}
7575
INSTALL_PKGS="$INSTALL_PKGS rh-postgresql{{ spec.short }}-pgaudit" && \
76-
{% elif spec.prod == 'rhel8' or spec.prod == 'c9s' or spec.prod == 'c8s' %}
76+
{% elif spec.prod == 'rhel8' or spec.prod == 'rhel9' or spec.prod == 'c9s' or spec.prod == 'c8s' %}
7777
INSTALL_PKGS="$INSTALL_PKGS pgaudit" && \
7878
{% endif %}
7979
{% endif %}
@@ -95,7 +95,7 @@ ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \
9595
COPY root /
9696
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
9797

98-
{% if spec.prod != "rhel8" and config.os.id != "fedora" and spec.prod != "c8s" and spec.prod != "c9s" %}
98+
{% if spec.prod != "rhel8" and spec.prod != "rhel9" and config.os.id != "fedora" and spec.prod != "c8s" and spec.prod != "c9s" %}
9999
# When bash is started non-interactively, to run a shell script, for example it
100100
# looks for this variable and source the content of this file. This will enable
101101
# the SCL for all scripts without need to do 'scl enable'.

src/root/usr/share/container-scripts/postgresql/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This container image includes PostgreSQL {{ spec.version }} SQL database server
55
Users can choose between RHEL, CentOS and Fedora based images.
66
The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/),
77
the CentOS images are available on [Quay.io](https://quay.io/organization/centos7),
8-
and the Fedora images are available in [Fedora Registry](https://registry.fedoraproject.org/).
8+
and the Fedora images are available in [Quay.io](https://quay.io/organization/fedora).
99
The resulting image can be run using [podman](https://github.com/containers/libpod).
1010

1111
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
327327
https://github.com/sclorg/postgresql-container.
328328
In that repository, the Dockerfile for CentOS is called Dockerfile, the Dockerfile
329329
for RHEL7 is called Dockerfile.rhel7, the Dockerfile for RHEL8 is called Dockerfile.rhel8,
330+
the Dockerfile for RHEL9 is called Dockerfile.rhel9,
330331
and the Dockerfile for Fedora is called Dockerfile.fedora.

0 commit comments

Comments
 (0)