Skip to content

Commit 01adfc6

Browse files
authored
Merge pull request #7967 from readthedocs/humitos/docker-psql-client
Upgrade `postgres-client` to v12 in Docker image
2 parents 0e5d6a9 + e4a927a commit 01adfc6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dockerfiles/Dockerfile

+10-1
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,23 @@ RUN apt-get -y install \
2020
build-essential \
2121
python3-pip \
2222
python3-dev \
23-
postgresql-client \
2423
libmysqlclient-dev \
2524
libfreetype6 \
2625
libjpeg-dev \
2726
sqlite \
2827
netcat \
2928
telnet
3029

30+
# https://www.postgresql.org/download/linux/ubuntu/
31+
# Use PostgreSQL client 12 from official PostgreSQL Ubuntu's repository to avoid this WARNING
32+
# WARNING: psql major version 10, server major version 12.
33+
# Some psql features might not work.
34+
# TODO: remove this when upgrading to Ubuntu 20.04 LTS
35+
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
36+
RUN curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
37+
RUN apt-get -y update
38+
RUN apt-get -y install postgresql-client-12
39+
3140
# Uncomment en_US.UTF-8 locale and generate it
3241
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
3342
locale-gen

0 commit comments

Comments
 (0)