2026-05-20 17:50:37 +08:00
|
|
|
FROM postgres:16-alpine
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
|
git \
|
|
|
|
|
build-base
|
|
|
|
|
|
|
|
|
|
RUN git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git /tmp/pgvector \
|
|
|
|
|
&& cd /tmp/pgvector \
|
|
|
|
|
&& make with_llvm=no \
|
|
|
|
|
&& make install with_llvm=no \
|
|
|
|
|
&& rm -rf /tmp/pgvector
|
|
|
|
|
|
|
|
|
|
RUN apk del git build-base
|
2026-05-21 17:29:52 +08:00
|
|
|
|
|
|
|
|
RUN echo "CREATE EXTENSION IF NOT EXISTS vector;" >> /docker-entrypoint-initdb.d/01-vector.sql
|
|
|
|
|
RUN echo "CREATE EXTENSION IF NOT EXISTS cube;" >> /docker-entrypoint-initdb.d/02-cube.sql
|