-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 1.25 KB
/
Copy pathDockerfile
File metadata and controls
30 lines (23 loc) · 1.25 KB
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
# Use the official pgvector image as the base image
ARG PG_VECTOR_BASE_VERSION=0.8.0-pg17
FROM pgvector/pgvector:${PG_VECTOR_BASE_VERSION}
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Switch to root for configuring runtime dependencies
USER root
######################
# pg_search
######################
# Install all .deb packages and cleanup in one RUN command
COPY pg_search.deb pgvectorscale.deb /tmp/
RUN dpkg -i /tmp/pg_search.deb || apt-get install -fy && \
dpkg -i /tmp/pgvectorscale.deb || apt-get install -fy && \
apt-get autoremove --purge -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/log/*.log /var/log/apt/* /var/log/dpkg.log
# The postgresql.conf.sample file serves as a template for postgresql.conf, which is created upon the first container start.
# Our settings are added to postgresql.conf.sample to ensure they are applied to postgresql.conf.
# The `postgres` database is the default database in every Postgres installation.
RUN sed -i "/^shared_preload_libraries/s/'\([^']*\)'/'\1,pg_search'/" /usr/share/postgresql/postgresql.conf.sample
# No need for an ENTRYPOINT or CMD if the base image handles PostgreSQL startup
COPY ./bootstrap.sh /docker-entrypoint-initdb.d/10_bootstrap_paradedb.sh