Skip to content

Commit 5c75800

Browse files
authored
Merge pull request #1 from constructive-io/devin/1767278532-fix-dockerfile-build
Fix Dockerfile to compile all 4 extensions
2 parents d9aae05 + 797e6bd commit 5c75800

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
ARG PG_VERSION=17
55
ARG PGVECTOR_VERSION=0.8.0
66
ARG POSTGIS_VERSION=3.5.1
7+
ARG PG_TEXTSEARCH_VERSION=0.2.0
78
ARG PGSODIUM_VERSION=3.1.9
89

910
#############################################
@@ -13,6 +14,7 @@ FROM postgres:${PG_VERSION}-alpine AS builder
1314

1415
ARG PGVECTOR_VERSION
1516
ARG POSTGIS_VERSION
17+
ARG PG_TEXTSEARCH_VERSION
1618
ARG PGSODIUM_VERSION
1719

1820
RUN 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

3541
WORKDIR /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

0 commit comments

Comments
 (0)