Skip to content

Commit 01f0a1e

Browse files
committed
[FIX] Odoo 10.0-12.0: use latest postgresql-client
As the Odoo Docker images are based on Debian Jessie and Stretch, they use the postgresql-client package from the respective Debian repo. The backup feature of Odoo uses the postgresql-client. As a consequence, if a database server newer than the client is used, the backup may fail. For example, when using the Odoo Docker image 10.0 against a postgresql server 10.0, the backup fails. With this commit, the latest postgresql-client is used from the Postgres repository. As they seem to be backward compatible, the Odoo backup will succeed wathever the client/server combination. fixes odoo/odoo#30599
1 parent 5ef3bee commit 01f0a1e

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

10.0/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ RUN set -x; \
2424
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb \
2525
&& pip install psycogreen==1.0
2626

27+
# install latest postgresql-client
28+
RUN set -x; \
29+
echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' > etc/apt/sources.list.d/pgdg.list \
30+
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
31+
&& apt-get update \
32+
&& apt-get install -y postgresql-client
33+
2734
# Install Odoo
2835
ENV ODOO_VERSION 10.0
2936
ENV ODOO_RELEASE 20181126

11.0/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN set -x; \
1010
&& apt-get install -y --no-install-recommends \
1111
ca-certificates \
1212
curl \
13+
gnupg \
1314
libssl1.0-dev \
1415
node-less \
1516
python3-pip \
@@ -26,6 +27,13 @@ RUN set -x; \
2627
&& apt-get -y install -f --no-install-recommends \
2728
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
2829

30+
# install latest postgresql-client
31+
RUN set -x; \
32+
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > etc/apt/sources.list.d/pgdg.list \
33+
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
34+
&& apt-get update \
35+
&& apt-get install -y postgresql-client
36+
2937
# Install Odoo
3038
ENV ODOO_VERSION 11.0
3139
ENV ODOO_RELEASE 20181126

12.0/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN set -x; \
1010
&& apt-get install -y --no-install-recommends \
1111
ca-certificates \
1212
curl \
13+
gnupg \
1314
libssl1.0-dev \
1415
node-less \
1516
python3-pip \
@@ -26,6 +27,13 @@ RUN set -x; \
2627
&& apt-get -y install -f --no-install-recommends \
2728
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
2829

30+
# install latest postgresql-client
31+
RUN set -x; \
32+
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > etc/apt/sources.list.d/pgdg.list \
33+
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
34+
&& apt-get update \
35+
&& apt-get install -y postgresql-client
36+
2937
# Install Odoo
3038
ENV ODOO_VERSION 12.0
3139
ENV ODOO_RELEASE 20181126

0 commit comments

Comments
 (0)