From 36334fc8616b1ce0192762e082d82e7ff68fd57a Mon Sep 17 00:00:00 2001 From: Julio Gonzalez Gil Date: Sat, 30 May 2026 04:14:32 +0200 Subject: [PATCH] Add PostgreSQL 19 testing, replace Rocky Linux 8 with 9 As per https://yum.postgresql.org/, Rocky Linux 8 and similar will not get PostgreSQL19 --- README.md | 5 +++-- manage_images | 4 ++-- {rockylinux8 => rockylinux9}/Dockerfile | 6 +++--- {rockylinux8 => rockylinux9}/files/check_updates.sh | 0 {rockylinux8 => rockylinux9}/files/postgresql.repo | 2 +- {rockylinux8 => rockylinux9}/files/start_postgresql.sh | 0 ubuntu24.04/Dockerfile | 5 ++++- 7 files changed, 13 insertions(+), 9 deletions(-) rename {rockylinux8 => rockylinux9}/Dockerfile (92%) rename {rockylinux8 => rockylinux9}/files/check_updates.sh (100%) rename {rockylinux8 => rockylinux9}/files/postgresql.repo (84%) rename {rockylinux8 => rockylinux9}/files/start_postgresql.sh (100%) diff --git a/README.md b/README.md index 36536a9..1677fe8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ For example they are used as a base to build [container images for tds_fdw Count Current distributions available: * openSUSE Leap 16.0 -* Rocky Linux 8 +* Rocky Linux 9 * Ubuntu 24.04 Current PostgreSQL versions available: @@ -20,6 +20,7 @@ Current PostgreSQL versions available: * 16 * 17 * 18 +* 19 # Building images @@ -31,7 +32,7 @@ Run: # Running the images -Tu run, for example PostgreSQL 18 under Rocky Linux 8: +Tu run, for example PostgreSQL 18 under Rocky Linux 9: ``` docker run -t --name test -e "DB_NAME=mydbname" -e "DB_PASS=mydbpassword" juliogonzalez/rockylinux8-postgresql:18 diff --git a/manage_images b/manage_images index 8c78715..a2d0c91 100755 --- a/manage_images +++ b/manage_images @@ -7,8 +7,8 @@ LANG=en_EN SCRIPT=$(basename ${0}) # Supported distributions and PostgreSQL versions -SUPPORTEDDISTROS="rockylinux8 ubuntu24.04 opensuseleap16.0" -SUPPORTEDPGVERS="13 14 15 16 17 18" +SUPPORTEDDISTROS="rockylinux9 ubuntu24.04 opensuseleap16.0" +SUPPORTEDPGVERS="13 14 15 16 17 18 19-testing" # Ignored combinations, will exit without errors so the CI does not fail IGNOREDCOMBINATIONS="" diff --git a/rockylinux8/Dockerfile b/rockylinux9/Dockerfile similarity index 92% rename from rockylinux8/Dockerfile rename to rockylinux9/Dockerfile index 3cf5459..4c65e92 100644 --- a/rockylinux8/Dockerfile +++ b/rockylinux9/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rockylinux/rockylinux:8 +FROM docker.io/rockylinux/rockylinux:9 MAINTAINER Julio Gonzalez Gil USER root @@ -40,10 +40,10 @@ RUN if [ ! -f /etc/yum.repos.d/postgresql-${POSTGRESQL_VER/./}.repo ]; then \ # PostgreSQL packages (cache will be used for previous steps) ARG DATE=None -# Generate a list of original packages, add EPEL, enable powertools, disable the default PostgreSQL module, update and install PostgreSQL +# Generate a list of original packages, add EPEL, enable crb, disable the default PostgreSQL module, update and install PostgreSQL RUN rpm -qa --qf "%{NAME}\n" > /opt/packages-image.txt && \ dnf -y -q install epel-release && \ - dnf config-manager --set-enabled powertools && \ + dnf config-manager --enable crb && \ dnf -y -q module disable postgresql && \ dnf -y -q update && \ dnf -y -q install \ diff --git a/rockylinux8/files/check_updates.sh b/rockylinux9/files/check_updates.sh similarity index 100% rename from rockylinux8/files/check_updates.sh rename to rockylinux9/files/check_updates.sh diff --git a/rockylinux8/files/postgresql.repo b/rockylinux9/files/postgresql.repo similarity index 84% rename from rockylinux8/files/postgresql.repo rename to rockylinux9/files/postgresql.repo index efb7356..4aaa766 100644 --- a/rockylinux8/files/postgresql.repo +++ b/rockylinux9/files/postgresql.repo @@ -1,6 +1,6 @@ [postgresql-] name=PostgreSQL -baseurl=https://download.postgresql.org/pub/repos/yum//redhat/rhel-8-x86_64/ +baseurl=https://download.postgresql.org/pub/repos/yum//redhat/rhel-$releasever-x86_64/ enabled=1 gpgcheck=1 gpgkey=https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL diff --git a/rockylinux8/files/start_postgresql.sh b/rockylinux9/files/start_postgresql.sh similarity index 100% rename from rockylinux8/files/start_postgresql.sh rename to rockylinux9/files/start_postgresql.sh diff --git a/ubuntu24.04/Dockerfile b/ubuntu24.04/Dockerfile index 658e95e..d271a25 100644 --- a/ubuntu24.04/Dockerfile +++ b/ubuntu24.04/Dockerfile @@ -47,7 +47,10 @@ RUN dpkg --get-selections | grep 'install' | grep -v 'deinstall'|cut -f1 > /opt/ apt-get -qq -o=Dpkg::Use-Pty=0 update > /dev/null && \ LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 -y install ca-certificates && \ LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 -y dist-upgrade > /dev/null && \ - [ ${POSTGRESQL_TESTING} -eq 1 ] && TESTING="-testing"; echo "deb https://download.postgresql.org/pub/repos/apt/ noble-pgdg${testing} ${POSTGRESQL_VER} main" >> /etc/apt/sources.list.d/pgdg.list && \ + echo "deb https://apt.postgresql.org/pub/repos/apt/ noble-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ + [ ${POSTGRESQL_TESTING} -eq 1 ] && TESTING='-snapshot'; \ + echo "deb https://apt.postgresql.org/pub/repos/apt/ noble-pgdg${TESTING} ${POSTGRESQL_VER}" >> /etc/apt/sources.list.d/pgdg.list && \ + echo 'Package: *\nPin: release o=apt.postgresql.org\nPin-Priority: 800' > /etc/apt/preferences.d/pgdg.pref && \ apt-get -qq -o=Dpkg::Use-Pty=0 update > /dev/null && \ LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 -y install \ postgresql-${POSTGRESQL_VER} \