Skip to content

Commit e35801a

Browse files
feat: install postgres 16
1 parent 8acd9c8 commit e35801a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ ENV DEBIAN_FRONTEND=noninteractive
5454

5555
COPY clear-cache /bin/clear-cache
5656

57-
# Use Dockerfile-native mechanisms for PHP repo setup
57+
# Use Dockerfile-native mechanisms for apt repo setup
5858
# Procedure adapted from https://packages.sury.org/php/README.txt
5959
ARG BUILD_DIR
60+
RUN install -d /usr/share/postgresql-common/pgdg/
61+
ADD --link --chmod=0555 \
62+
--checksum=sha256:0144068502a1eddd2a0280ede10ef607d1ec592ce819940991203941564e8e76 \
63+
https://www.postgresql.org/media/keys/ACCC4CF8.asc /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
6064
RUN \
6165
--mount=type=bind,target=$BUILD_DIR,source=$BUILD_DIR,from=debsuryorg-key \
6266
dpkg -i $BUILD_DIR/debsuryorg-archive-keyring.deb
@@ -66,8 +70,10 @@ RUN \
6670
<<EOS
6771
set -e
6872
apt-get update
69-
apt-get install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends --no-install-suggests lsb-release ca-certificates
70-
echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
73+
apt-get install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends --no-install-suggests ca-certificates
74+
. /etc/os-release
75+
echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $VERSION_CODENAME main" > /etc/apt/sources.list.d/php.list
76+
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" > /etc/apt/sources.list.d/pgdg.list
7177
apt-get update
7278
EOS
7379

@@ -85,7 +91,7 @@ apt-get install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends
8591
openssl \
8692
sudo \
8793
unzip \
88-
postgresql-client \
94+
postgresql-client-16 \
8995
postgresql-client-common \
9096
imagemagick \
9197
poppler-utils \

0 commit comments

Comments
 (0)