Skip to content

Commit 626a834

Browse files
committed
feat: update postgresql repository setup
Use per-repository signing instead of installing the keys using deprecated methods.
1 parent ad2a0f6 commit 626a834

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ RUN \
8989
&& c_rehash \
9090
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
9191
&& /usr/sbin/locale-gen \
92-
&& echo "deb http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
93-
&& curl -L https://www.postgresql.org/media/keys/ACCC4CF8.asc > /etc/apt/trusted.gpg.d/pgdg.asc \
92+
&& install -d /usr/share/postgresql-common/pgdg \
93+
&& curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc \
94+
&& echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
9495
&& apt-get update \
9596
&& apt-get install --no-install-recommends -y postgresql-client-17 \
9697
&& apt-get clean \

0 commit comments

Comments
 (0)