@@ -2,18 +2,18 @@ ARG CI_COMMIT_TIMESTAMP
22ARG CI_COMMIT_SHA
33ARG CI_COMMIT_TAG
44ARG CI_UPSTREAM_VERSION
5-
6- # vchord binary container
7- FROM tensorchord/vchord-binary:pg17-v0.4.3-${TARGETARCH} as vchord
5+ ARG VCHORD_VERSION=0.4.3
86
97# main container
10- FROM ghcr.io/cloudnative-pg/postgresql:17.5-7@sha256:ce4f594010149f48592359ddd87fb0ba8a99cbc871965d2aaa770d025c5c6025
8+ FROM ghcr.io/cloudnative-pg/postgresql:16.8-14@sha256:ed9bd4a26b152cf35f2c64e15f48126e3477ad222cfb04794562bdc999b8f0be
9+
10+ ARG VCHORD_VERSION
1111
1212LABEL org.opencontainers.image.authors="Daniel Muehlbachler-Pietrzykowski <daniel.muehlbachler@niftyside.com>"
1313LABEL org.opencontainers.image.vendor="Daniel Muehlbachler-Pietrzykowski"
1414LABEL org.opencontainers.image.source="https://github.com/muhlba91/postgresql-pgvecto-container"
1515LABEL org.opencontainers.image.created="${CI_COMMIT_TIMESTAMP}"
16- LABEL org.opencontainers.image.title="cloudnativepg-postgresql-vchord "
16+ LABEL org.opencontainers.image.title="cloudnativepg-postgresql-vectorchord "
1717LABEL org.opencontainers.image.description="A container integrating VectorChord into CloudNativePG PostgreSQL"
1818LABEL org.opencontainers.image.revision="${CI_COMMIT_SHA}"
1919LABEL org.opencontainers.image.version="${CI_COMMIT_TAG}"
@@ -22,11 +22,17 @@ LABEL org.opencontainers.image.upstream="${CI_UPSTREAM_VERSION}"
2222# use root to install binaries
2323USER root
2424
25- # taken from https://github.com/tensorchord/VectorChord/
26- COPY --from=vchord /workspace/postgresql-*.deb /tmp/vchord.deb
27- RUN apt-get install --yes --no-install-recommends /tmp/vchord.deb && rm -f /tmp/vchord.deb
25+ # taken from: https://github.com/tensorchord/VectorChord-images
26+ # hadolint ignore=DL3008,DL3015,SC2046
27+ RUN apt-get update && \
28+ apt-get install -y --no-install-recommends wget ca-certificates && \
29+ wget -q https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_VERSION}/postgresql-16-vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb -P /tmp && \
30+ apt-get install -y /tmp/postgresql-16-vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb && \
31+ apt-get remove -y wget ca-certificates && \
32+ apt-get purge -y --auto-remove && \
33+ rm -rf /tmp/* /var/lib/apt/lists/*
2834
2935# set user back to postgres
3036USER 26
3137
32- CMD ["postgres" , "-c" ,"shared_preload_libraries=vchord.so" , "-c" , "search_path= \" $user \" , public, vectors" , "-c" , "logging_collector=on" ]
38+ CMD ["postgres" , "-c" ,"shared_preload_libraries=vchord.so" ]
0 commit comments