-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
33 lines (22 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ARG ALPINE_VERSION=3.19.0
ARG CRUNCHYDATA_VERSION
ARG PG_MAJOR
FROM alpine:${ALPINE_VERSION} as builder
RUN apk add --no-cache curl alien rpm binutils xz
WORKDIR /tmp
ARG PG_MAJOR
ARG TARGETARCH
# renovate: datasource=github-releases depName=tensorchord/pgvecto.rs
ARG PGVECTORS_TAG=v0.3.0
RUN curl --fail -o pgvectors.deb -sSL https://github.com/tensorchord/pgvecto.rs/releases/download/${PGVECTORS_TAG}/vectors-pg${PG_MAJOR}_${PGVECTORS_TAG:1}_${TARGETARCH}.deb && \
alien -r pgvectors.deb && \
rm -f pgvectors.deb
RUN rpm2cpio /tmp/*.rpm | cpio -idmv
ARG CRUNCHYDATA_VERSION
FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres:${CRUNCHYDATA_VERSION}
ARG PG_MAJOR
COPY --chown=root:root --chmod=755 --from=builder /tmp/usr/lib/postgresql/${PG_MAJOR}/lib/vectors.so /usr/pgsql-${PG_MAJOR}/lib/
COPY --chown=root:root --chmod=755 --from=builder /tmp/usr/share/postgresql/${PG_MAJOR}/extension/vectors* /usr/pgsql-${PG_MAJOR}/share/extension/
# Numeric User ID for Default Postgres User
USER 26
COPY app/pgvectors.sql /docker-entrypoint-initdb.d/