File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44ARG PG_VERSION=17
55ARG PGVECTOR_VERSION=0.8.0
66ARG POSTGIS_VERSION=3.5.1
7+ ARG PG_TEXTSEARCH_VERSION=0.2.0
78ARG PGSODIUM_VERSION=3.1.9
89
910# ############################################
@@ -13,6 +14,7 @@ FROM postgres:${PG_VERSION}-alpine AS builder
1314
1415ARG PGVECTOR_VERSION
1516ARG POSTGIS_VERSION
17+ ARG PG_TEXTSEARCH_VERSION
1618ARG PGSODIUM_VERSION
1719
1820RUN apk add --no-cache \
@@ -30,7 +32,11 @@ RUN apk add --no-cache \
3032 protobuf-c-dev \
3133 libxml2-dev \
3234 pcre2-dev \
33- libsodium-dev
35+ libsodium-dev \
36+ # PostGIS build tools
37+ perl \
38+ flex \
39+ bison
3440
3541WORKDIR /build
3642
@@ -51,8 +57,10 @@ RUN curl -L https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VERSION}
5157 make install
5258
5359# pg_textsearch (BM25)
54- RUN git clone --depth 1 https://github.com/timescale/pg_textsearch.git && \
60+ RUN git clone --branch v${PG_TEXTSEARCH_VERSION} -- depth 1 https://github.com/timescale/pg_textsearch.git && \
5561 cd pg_textsearch && \
62+ # Fix missing math.h include (upstream bug)
63+ sed -i '1i #include <math.h>' src/am/build.c && \
5664 make -j$(nproc) && \
5765 make install
5866
You can’t perform that action at this time.
0 commit comments