Skip to content

Commit

Permalink
tembo-pg-slim: set built from source libpq as system default (#76)
Browse files Browse the repository at this point in the history
* `tembo-pg-slim`: set built from source `libpq` as system default

* Bump Trunk and Rust versions

* pg-slim: bump to 24.04

* Undo bump to 24.04, update geo-cnpg
  • Loading branch information
vrmiguel authored Dec 19, 2024
1 parent 30219f2 commit 35b0240
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
10 changes: 8 additions & 2 deletions geo-cnpg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ RUN apt-get update && \
libproj-dev \
libprotobuf-c-dev \
protobuf-c-compiler \
libgdal-dev \
libgsl-dev \
libjson-c-dev \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/OSGeo/gdal/releases/download/v3.6.0/gdal-3.6.0.tar.gz && \
tar xvf gdal-3.6.0.tar.gz && \
cd gdal-3.6.0 && \
mkdir build && cd build && \
cmake .. && \
cmake --build . && \
cmake --build . --target install

# Download and build PostGIS
RUN wget https://download.osgeo.org/postgis/source/postgis-3.4.0.tar.gz && \
tar xvf postgis-3.4.0.tar.gz && \
Expand All @@ -29,7 +36,6 @@ RUN wget https://download.osgeo.org/postgis/source/postgis-3.4.0.tar.gz && \
make install

# Clone and build mobilitydb

RUN git clone https://github.com/MobilityDB/MobilityDB && \
cd MobilityDB && \
git checkout v1.2.0rc1 && \
Expand Down
4 changes: 2 additions & 2 deletions standard-cnpg/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG PG_VERSION=15
ARG TAG=latest

FROM rust:1.74-bookworm as builder
FROM rust:1.83-bookworm as builder

ARG TRUNK_VER=0.15.0
ARG TRUNK_VER=0.15.7

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
RUN cargo install --version $TRUNK_VER pg-trunk
Expand Down
4 changes: 2 additions & 2 deletions tembo-pg-cnpg/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG PG_VERSION=15
ARG TAG=latest

FROM rust:1.78-bookworm as builder
FROM rust:1.83-bookworm as builder

ARG TRUNK_VER=0.15.0
ARG TRUNK_VER=0.15.7

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
RUN cargo install --version $TRUNK_VER pg-trunk
Expand Down
12 changes: 9 additions & 3 deletions tembo-pg-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ RUN ./configure --prefix=/usr/lib/postgresql/${PG_VERSION} \
RUN make -j$(nproc)
RUN make install

# Remove libpq-dev provided from Ubuntu repos and set the newly-compiled one to system path
RUN set -eux; \
apt-get purge -y libpq-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

RUN echo "${ALTDIR}/${PG_VERSION}/lib" > /etc/ld.so.conf.d/postgres.conf && \
ldconfig

WORKDIR /
RUN rm -rf /postgres

# Remove pre-installed pg_config
RUN rm /usr/bin/pg_config

RUN mkdir -p /var/run/postgresql && chmod 775 /var/run/postgresql
RUN mkdir -p /usr/share/postgresql/${PG_MAJOR}/extension && chmod 775 /usr/share/postgresql/${PG_MAJOR}/extension

Expand Down

0 comments on commit 35b0240

Please sign in to comment.