[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
This commit is contained in:
Christophe Monniez 2019-01-29 14:34:05 +01:00
parent 5ef3bee9dc
commit 01f0a1e508
3 changed files with 23 additions and 0 deletions

View File

@ -24,6 +24,13 @@ RUN set -x; \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb \
&& pip install psycogreen==1.0
# install latest postgresql-client
RUN set -x; \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' > etc/apt/sources.list.d/pgdg.list \
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update \
&& apt-get install -y postgresql-client
# Install Odoo
ENV ODOO_VERSION 10.0
ENV ODOO_RELEASE 20181126

View File

@ -10,6 +10,7 @@ RUN set -x; \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
libssl1.0-dev \
node-less \
python3-pip \
@ -26,6 +27,13 @@ RUN set -x; \
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client
RUN set -x; \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > etc/apt/sources.list.d/pgdg.list \
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update \
&& apt-get install -y postgresql-client
# Install Odoo
ENV ODOO_VERSION 11.0
ENV ODOO_RELEASE 20181126

View File

@ -10,6 +10,7 @@ RUN set -x; \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
libssl1.0-dev \
node-less \
python3-pip \
@ -26,6 +27,13 @@ RUN set -x; \
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client
RUN set -x; \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > etc/apt/sources.list.d/pgdg.list \
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update \
&& apt-get install -y postgresql-client
# Install Odoo
ENV ODOO_VERSION 12.0
ENV ODOO_RELEASE 20181126