Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tembo-pg-slim: set built from source libpq as system default #76

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading