From 6656bfe7d60a1a0bbb579a5fa175cb63b02e3b33 Mon Sep 17 00:00:00 2001 From: Jonathan Gonzalez V Date: Thu, 14 Sep 2023 17:01:54 -0300 Subject: [PATCH] chore: add pgvector extension Signed-off-by: Jonathan Gonzalez V --- UBI/Dockerfile-multiarch.template | 17 +++++++++++++++-- UBI/Dockerfile-postgis-multilang.template | 1 + UBI/Dockerfile-postgis.template | 1 + UBI/Dockerfile.template | 4 ++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/UBI/Dockerfile-multiarch.template b/UBI/Dockerfile-multiarch.template index 4e695d1ad..88d75487a 100644 --- a/UBI/Dockerfile-multiarch.template +++ b/UBI/Dockerfile-multiarch.template @@ -18,6 +18,7 @@ RUN --mount=type=secret,id=cs_token \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ pg_failover_slots_pkg="pg_failover_slots_%%PG_MAJOR%%" ; \ + pgvector="pgvector_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ @@ -28,9 +29,11 @@ RUN --mount=type=secret,id=cs_token \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ;; \ + pgvector="edb-as%%PG_MAJOR%%-pgvector0" ;; \ s390x) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/edb/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ;; \ + pgvector="edb-as%%PG_MAJOR%%-pgvector0" ;; \ *) \ exit 1 ;; \ esac ; \ @@ -39,7 +42,7 @@ RUN --mount=type=secret,id=cs_token \ rm -fr /etc/rpm/macros.image-language-conf ; \ yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ case %%PG_MAJOR%% in \ - 11|12|13|14) \ + 11) \ yum -y --setopt=tsflags=nodocs install \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ @@ -48,7 +51,17 @@ RUN --mount=type=secret,id=cs_token \ pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ "$pg_failover_slots_pkg" \ ;; \ - 15|16) \ + 12|13|14|15) \ + yum -y --setopt=tsflags=nodocs install \ + postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ + postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ + postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ + postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ + pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ + "$pg_failover_slots_pkg" \ + "$pgvector" \ + ;; \ + 16) \ yum -y --setopt=tsflags=nodocs install \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ diff --git a/UBI/Dockerfile-postgis-multilang.template b/UBI/Dockerfile-postgis-multilang.template index b89c928cd..de08ba8dd 100644 --- a/UBI/Dockerfile-postgis-multilang.template +++ b/UBI/Dockerfile-postgis-multilang.template @@ -36,6 +36,7 @@ RUN set -xe ; \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ pg_failover_slots_%%PG_MAJOR%% \ + pgvector_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis.template b/UBI/Dockerfile-postgis.template index 3240dd0b3..67ce792c4 100644 --- a/UBI/Dockerfile-postgis.template +++ b/UBI/Dockerfile-postgis.template @@ -35,6 +35,7 @@ RUN set -xe ; \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ pg_failover_slots_%%PG_MAJOR%% \ + pgvector_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile.template b/UBI/Dockerfile.template index 2d2679b46..410160ef3 100644 --- a/UBI/Dockerfile.template +++ b/UBI/Dockerfile.template @@ -18,6 +18,7 @@ RUN --mount=type=secret,id=cs_token \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ pg_failover_slots_pkg="pg_failover_slots_%%PG_MAJOR%%" ; \ + pgvector="pgvector_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ @@ -28,9 +29,11 @@ RUN --mount=type=secret,id=cs_token \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ;; \ + pgvector="edb-as%%PG_MAJOR%%-pgvector0" ;; \ s390x) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/edb/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ;; \ + pgvector="edb-as%%PG_MAJOR%%-pgvector0" ;; \ *) \ exit 1 ;; \ esac ; \ @@ -44,6 +47,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ "$pg_failover_slots_pkg" \ + "$pgvector" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ rm -fr /tmp/* ; \