Files
cloudnative-vectorchord-pgv…/Dockerfile

19 lines
623 B
Docker
Raw Normal View History

ARG PG_MAJOR=14
2023-11-26 14:24:06 +00:00
FROM ghcr.io/cloudnative-pg/postgresql:$PG_MAJOR
2023-11-26 14:24:06 +00:00
ARG PG_MAJOR
2023-11-26 14:24:06 +00:00
ARG PGVECTORS_TAG=v0.1.10
ARG ARCH=x86_64
2023-11-26 14:24:06 +00:00
# drop to root to install packages
USER root
ADD https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg$PG_MAJOR-$PGVECTORS_TAG-$ARCH-unknown-linux-gnu.deb ./pgvectors.deb
RUN apt install ./pgvectors.deb
2023-11-26 14:24:06 +00:00
USER postgres
2023-11-26 14:24:06 +00:00
# From https://stackoverflow.com/a/42508925
# Note that this way of enabling the plugin only works on database init
# We should investigate alternative ways of enabling it that will always work
COPY install-pgvectors.sql /docker-entrypoint-initdb.d/