From 28b4e6494b6cb9960c3d24869bba6bbfd208f3ce Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Fri, 24 Jan 2025 10:36:43 +0200 Subject: [PATCH] Now it is possibel to build set minor ver of PG like 16.4 --- .../build/pgbackrest/Dockerfile | 2 +- .../build/postgres-gis/Dockerfile | 2 +- .../build/postgres/Dockerfile | 28 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/postgresql-containers/build/pgbackrest/Dockerfile b/postgresql-containers/build/pgbackrest/Dockerfile index 04e87ba1..09f809aa 100644 --- a/postgresql-containers/build/pgbackrest/Dockerfile +++ b/postgresql-containers/build/pgbackrest/Dockerfile @@ -73,7 +73,7 @@ RUN set -ex; \ systemd \ libpq \ nss_wrapper \ - percona-postgresql${PG_MAJOR}-libs \ + percona-postgresql${PG_MAJOR%%.*}-libs \ libedit; \ microdnf -y clean all diff --git a/postgresql-containers/build/postgres-gis/Dockerfile b/postgresql-containers/build/postgres-gis/Dockerfile index ff59ab48..0ceddc5e 100644 --- a/postgresql-containers/build/postgres-gis/Dockerfile +++ b/postgresql-containers/build/postgres-gis/Dockerfile @@ -16,7 +16,7 @@ ARG PG_MAJOR=14 RUN set -ex; \ yum-config-manager --enable ol9_codeready_builder ol9_developer_EPEL ol9_baseos_latest ol9_appstream; \ - microdnf -y install percona-postgis33_${PG_MAJOR} percona-postgis33_${PG_MAJOR}-client + microdnf -y install percona-postgis33_${PG_MAJOR%%.*} percona-postgis33_${PG_MAJOR%%.*}-client EXPOSE 5432 diff --git a/postgresql-containers/build/postgres/Dockerfile b/postgresql-containers/build/postgres/Dockerfile index 2512081e..e87bdf31 100644 --- a/postgresql-containers/build/postgres/Dockerfile +++ b/postgresql-containers/build/postgres/Dockerfile @@ -87,27 +87,27 @@ RUN set -ex; \ microdnf -y install \ libpq \ glibc-all-langpacks \ - percona-postgresql${PG_MAJOR//.}; \ + percona-postgresql${PG_MAJOR%%.*}; \ microdnf -y clean all # Preserving PGVERSION out of paranoia -ENV PGROOT="/usr/pgsql-${PG_MAJOR}" PGVERSION="${PG_MAJOR}" +ENV PGROOT="/usr/pgsql-${PG_MAJOR%%.*}" PGVERSION="${PG_MAJOR%%.*}" RUN set -ex; \ microdnf -y install \ --enablerepo="ol9_developer_EPEL" \ - percona-pgaudit${PG_MAJOR//.} \ - percona-pgaudit${PG_MAJOR//.}_set_user \ + percona-pgaudit${PG_MAJOR%%.*} \ + percona-pgaudit${PG_MAJOR%%.*}_set_user \ percona-pgbackrest \ - percona-postgresql${PG_MAJOR//.}-contrib \ - percona-postgresql${PG_MAJOR//.}-server \ - percona-postgresql${PG_MAJOR//.}-libs \ - percona-pg_stat_monitor${PG_MAJOR//.} \ - percona-postgresql${PG_MAJOR//.}-llvmjit \ - percona-wal2json${PG_MAJOR//.} \ - percona-pg_repack${PG_MAJOR//.} \ - percona-pgvector_${PG_MAJOR//.} \ - percona-pgvector_${PG_MAJOR//.}-llvmjit \ + percona-postgresql${PG_MAJOR%%.*}-contrib \ + percona-postgresql${PG_MAJOR%%.*}-server \ + percona-postgresql${PG_MAJOR%%.*}-libs \ + percona-pg_stat_monitor${PG_MAJOR%%.*} \ + percona-postgresql${PG_MAJOR%%.*}-llvmjit \ + percona-wal2json${PG_MAJOR%%.*} \ + percona-pg_repack${PG_MAJOR%%.*} \ + percona-pgvector_${PG_MAJOR%%.*} \ + percona-pgvector_${PG_MAJOR%%.*}-llvmjit \ psmisc \ rsync \ perl \ @@ -138,7 +138,7 @@ ENV PATH="${PGROOT}/bin:${PATH}" RUN set -ex; \ mkdir -p /opt/crunchy/bin /opt/crunchy/conf /pgdata /pgwal /pgconf /backrestrepo /tablespaces; \ chown -R postgres:postgres /opt/crunchy /var/lib/pgsql \ - /pgdata /pgwal /pgconf /backrestrepo /tablespaces /usr/pgsql-${PG_MAJOR//.}; \ + /pgdata /pgwal /pgconf /backrestrepo /tablespaces /usr/pgsql-${PG_MAJOR%%.*}; \ chmod -R g=u /opt/crunchy /var/lib/pgsql \ /pgdata /pgwal /pgconf /backrestrepo /tablespaces