changeset 3446:d2298ed6de7f

docker (pubsub): install latest version of `postgresql-client` with PostgreSQL own Debian repos.
author Goffi <goffi@goffi.org>
date Thu, 10 Dec 2020 10:28:05 +0100
parents fc83c4996c77
children c3f07c0cb2de
files docker/pubsub/Dockerfile
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/docker/pubsub/Dockerfile	Thu Dec 10 10:28:00 2020 +0100
+++ b/docker/pubsub/Dockerfile	Thu Dec 10 10:28:05 2020 +0100
@@ -4,12 +4,18 @@
 
 ARG DEBIAN_FRONTEND=noninteractive
 
+RUN \
+
 RUN apt-get update && apt-get upgrade -y && \
-    apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libpq-dev gcc postgresql-client && \
+    apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libpq-dev gcc gnupg && \
+    # we install postgresql repository to have latest version
+    echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
+    python3 -c 'from urllib.request import urlopen; print(urlopen("https://www.postgresql.org/media/keys/ACCC4CF8.asc").read().decode())' | apt-key add - && \
+    # now we can install the client
+    apt-get install -y --no-install-recommends postgresql-client && \
     # it's better to have a dedicated user
     useradd -m sat && \
     mkdir /src && chown sat:sat /src && \
-    \
     # we need UTF-8 locale
     sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen