-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (45 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
51 lines (45 loc) · 1.19 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM postgres:16-bullseye
# 1. Install Build Dependencies
RUN apt-get update && apt-get install -y \
postgresql-server-dev-16 \
gcc \
make \
git \
build-essential \
libcurl4-openssl-dev \
flex \
bison \
pkg-config \
libxml2-dev
# 2. Install pgvector (v0.7.0 is stable)
RUN cd /tmp && \
git clone --branch v0.7.0 https://github.com/pgvector/pgvector.git && \
cd pgvector && \
make && \
make install
# 3. Install pgsql-http
RUN cd /tmp && \
git clone https://github.com/pramsey/pgsql-http.git && \
cd pgsql-http && \
make && \
make install
# 4. Install Apache AGE (Graph) for PG16
RUN cd /tmp && \
git clone https://github.com/apache/age.git && \
cd age && \
# AGE versioning can be tricky, ensuring we are on a PG16 compatible branch/tag
git checkout PG16 && \
make && \
make install
# 5. Cleanup to keep image small
RUN rm -rf /tmp/* && \
apt-get purge -y --auto-remove \
postgresql-server-dev-16 \
gcc \
make \
git \
build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Run schema/init on first database startup.
COPY schema.sql /docker-entrypoint-initdb.d/init.sql