From bedc92456c2ddd8a5e01eeddbbd8c3e914047b01 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Thu, 13 Feb 2025 15:00:14 +0200 Subject: [PATCH] Upgrade postgres to v17.2 in compose --- compose/db/Dockerfile | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/compose/db/Dockerfile b/compose/db/Dockerfile index f1697b53f02..e02b88c7c23 100644 --- a/compose/db/Dockerfile +++ b/compose/db/Dockerfile @@ -2,40 +2,12 @@ # # SPDX-License-Identifier: LGPL-2.1-or-later -ARG BASE_IMAGE=library/postgres -ARG BASE_IMAGE_VERSION=16-alpine3.19 - -FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION} AS ext_builder -# Extension whitelisting to simulate the RDS behaviour -# Build https://github.com/dimitri/pgextwlist package from source, transfer it to target installation - -WORKDIR /build/ - -RUN apk add --update alpine-sdk postgresql-dev - -ARG PGEXTWLIST_VERSION="1.17" -RUN curl -sSfL https://github.com/dimitri/pgextwlist/archive/refs/tags/v${PGEXTWLIST_VERSION}.tar.gz \ - -o pgextwlist.tar.gz \ - && echo "183eae8b80e61431f0950b29a2552dd20ceebc9cb63f8fe40e48c84d6e6c033b pgextwlist.tar.gz" | sha256sum -c - \ - && tar xvzf pgextwlist.tar.gz \ - && cd pgextwlist-${PGEXTWLIST_VERSION} \ - && make \ - && make install \ - && cp pgextwlist.so .. \ - && cd - \ - && rm pgextwlist.tar.gz pgextwlist-${PGEXTWLIST_VERSION} -rf - -FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION} - -COPY --from=ext_builder /build/pgextwlist.so pgextwlist.so - -RUN mkdir "$(pg_config --pkglibdir)/plugins" \ - && install pgextwlist.so "$(pg_config --pkglibdir)/plugins/pgextwlist.so" +FROM library/postgres:17-alpine3.21 COPY postgresql.conf /var/lib/postgresql/ # Add the initialisation scripts COPY entry/* /docker-entrypoint-initdb.d/ -# Force the modified postgres configuration ito use +# Force the modified postgres configuration into use CMD ["-c", "config_file=/var/lib/postgresql/postgresql.conf"]