From b748e7174c6e2af0fd8de609e70f618342f42f26 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Sat, 16 Dec 2023 17:42:48 +0100 Subject: [PATCH] fix: pgvecto.rs install package got renamed (#25) * fix: pgvecto.rs install package got renamed * chore: Underscores * feat: Fail build if deb download returns 404 * chore: pgvecto.rs no longer versions with v prefix * Revert "chore: pgvecto.rs no longer versions with v prefix" This reverts commit a883c0de09ab439bbee45d9861e93416971427ae. * chore: Strip v prefix from pgvectors tag * chore: Use buildx TARGETARCH variable * fix: TARGETARCH arg needs to be specified --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 660394a..a369555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,11 @@ FROM curlimages/curl AS download ARG CNPG_TAG ARG PGVECTORS_TAG +ARG TARGETARCH WORKDIR /download RUN pg_major=$(echo $CNPG_TAG | cut -d'.' -f1) \ - && curl -o pgvectors.deb -sSL https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${pg_major}-$PGVECTORS_TAG-$(uname -m)-unknown-linux-gnu.deb + && curl --fail -o pgvectors.deb -sSL https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${pg_major}_${PGVECTORS_TAG#"v"}_$TARGETARCH.deb FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG @@ -21,4 +22,4 @@ USER postgres # 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/ \ No newline at end of file +COPY install-pgvectors.sql /docker-entrypoint-initdb.d/