comparison docker/pubsub/Dockerfile @ 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 73e04040d577
comparison
equal deleted inserted replaced
3445:fc83c4996c77 3446:d2298ed6de7f
2 2
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" 3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
4 4
5 ARG DEBIAN_FRONTEND=noninteractive 5 ARG DEBIAN_FRONTEND=noninteractive
6 6
7 RUN \
8
7 RUN apt-get update && apt-get upgrade -y && \ 9 RUN apt-get update && apt-get upgrade -y && \
8 apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libpq-dev gcc postgresql-client && \ 10 apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libpq-dev gcc gnupg && \
11 # we install postgresql repository to have latest version
12 echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
13 python3 -c 'from urllib.request import urlopen; print(urlopen("https://www.postgresql.org/media/keys/ACCC4CF8.asc").read().decode())' | apt-key add - && \
14 # now we can install the client
15 apt-get install -y --no-install-recommends postgresql-client && \
9 # it's better to have a dedicated user 16 # it's better to have a dedicated user
10 useradd -m sat && \ 17 useradd -m sat && \
11 mkdir /src && chown sat:sat /src && \ 18 mkdir /src && chown sat:sat /src && \
12 \
13 # we need UTF-8 locale 19 # we need UTF-8 locale
14 sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen 20 sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen
15 21
16 ENV LC_ALL en_US.UTF-8 22 ENV LC_ALL en_US.UTF-8
17 23