Skip to content

Commit

Permalink
chore: add pgvector extension
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Gonzalez V <[email protected]>
  • Loading branch information
sxd committed Sep 14, 2023
1 parent 51f0fc5 commit 6656bfe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
17 changes: 15 additions & 2 deletions UBI/Dockerfile-multiarch.template
Original file line number Diff line number Diff line change
Expand Up @@ -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" ; \
Expand All @@ -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 ; \
Expand All @@ -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%% \
Expand All @@ -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%% \
Expand Down
1 change: 1 addition & 0 deletions UBI/Dockerfile-postgis-multilang.template
Original file line number Diff line number Diff line change
Expand Up @@ -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='*'
Expand Down
1 change: 1 addition & 0 deletions UBI/Dockerfile-postgis.template
Original file line number Diff line number Diff line change
Expand Up @@ -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='*'
Expand Down
4 changes: 4 additions & 0 deletions UBI/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -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" ; \
Expand All @@ -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 ; \
Expand All @@ -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/* ; \
Expand Down

0 comments on commit 6656bfe

Please sign in to comment.