Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
feat: Simplify dockerfile (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
bo0tzz authored Dec 16, 2023
1 parent cd76329 commit b9f8988
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# syntax=docker/dockerfile-upstream:master
ARG CNPG_TAG

FROM curlimages/curl AS download
FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG

ARG CNPG_TAG
ARG PGVECTORS_TAG
ARG TARGETARCH

WORKDIR /download
RUN pg_major=$(echo $CNPG_TAG | cut -d'.' -f1) \
&& 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

# drop to root to install packages
USER root
COPY --from=download /download/pgvectors.deb ./pgvectors.deb
ADD https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${CNPG_TAG%.*}_${PGVECTORS_TAG#"v"}_$TARGETARCH.deb ./pgvectors.deb
RUN apt install ./pgvectors.deb

USER postgres
Expand Down

0 comments on commit b9f8988

Please sign in to comment.