Skip to content

Commit f0749ce

Browse files
committed
fix: PG_MAJOR and PGDG repo for beta versions
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
1 parent 6c20c6f commit f0749ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ ARG BASE=debian:12.10-slim
22
FROM $BASE AS minimal
33

44
ARG PG_VERSION
5-
ARG PG_MAJOR=${PG_VERSION%%.*}
5+
ARG PG_MAJOR=${PG_VERSION%%[.~]*}
66

77
ENV PATH=$PATH:/usr/lib/postgresql/$PG_MAJOR/bin
88

99
RUN apt-get update && \
1010
apt-get install -y --no-install-recommends postgresql-common ca-certificates gnupg && \
11-
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \
11+
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y -c "${PG_MAJOR}" && \
1212
apt-get install -y --no-install-recommends -o Dpkg::::="--force-confdef" -o Dpkg::::="--force-confold" postgresql-common && \
1313
sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf && \
1414
apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)