docker (pubsub): install latest version of postgresql-client with PostgreSQL own Debian repos.

This commit is contained in:
Goffi 2020-12-10 10:28:05 +01:00
commit f69eb56a02

View file

@ -4,12 +4,18 @@ LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
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