Skip to content

Commit

Permalink
tembo-pg-slim: set built from source libpq as system default
Browse files Browse the repository at this point in the history
  • Loading branch information
vrmiguel committed Dec 17, 2024
1 parent 30219f2 commit d116074
Showing 1 changed file with 9 additions and 3 deletions.
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 d116074

Please sign in to comment.