chore: add support for PostgreSQL beta versions (#191)

Now bake supports beta versions for the list and the building of the images

Closes #190

Signed-off-by: Jonathan Gonzalez V <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
This commit is contained in:
Jonathan Gonzalez V.
2025-05-23 15:14:49 +02:00
committed by GitHub
parent b1421da867
commit 23e1fa6181
2 changed files with 38 additions and 12 deletions

View File

@@ -2,13 +2,13 @@ ARG BASE=debian:12.11-slim
FROM $BASE AS minimal
ARG PG_VERSION
ARG PG_MAJOR=${PG_VERSION%%.*}
ARG PG_MAJOR
ENV PATH=$PATH:/usr/lib/postgresql/$PG_MAJOR/bin
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql-common ca-certificates gnupg && \
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y -c "${PG_MAJOR}" && \
apt-get install -y --no-install-recommends -o Dpkg::::="--force-confdef" -o Dpkg::::="--force-confold" postgresql-common && \
sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf && \
apt-get install -y --no-install-recommends \
@@ -21,13 +21,10 @@ USER 26
FROM minimal AS standard
ARG EXTENSIONS
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends locales-all \
"postgresql-${PG_MAJOR}-pgaudit" \
"postgresql-${PG_MAJOR}-pgvector" \
"postgresql-${PG_MAJOR}-pg-failover-slots" && \
apt-get install -y --no-install-recommends locales-all ${EXTENSIONS} && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/*