From 733413dd167484b20cd28808985b5b51cb8ed129 Mon Sep 17 00:00:00 2001 From: sbts Date: Tue, 6 Feb 2018 23:01:08 +0800 Subject: [PATCH] install latest version of `postgresql-client` This is required to handle cases where the PG server is running a newer version than this container has available. Failing to do this update will normally cause odd problems, including silent failure to backup. Instead of the expected backup an empty file is generated. --- Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2161056..69394d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,20 @@ FROM debian:jessie MAINTAINER Freelock john@freelock.com # Install Perl, Tex, Starman, psql client, and all dependencies +# # Without libclass-c3-xs-perl, everything grinds to a halt; # add it, because it's a 'recommends' it the dep tree, which # we're skipping, normally +# +# Installing psql client directly from instructions at https://wiki.postgresql.org/wiki/Apt +# That mitigates issues where the PG instance is running a newer version than this container + RUN echo "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";" > /etc/apt/apt.conf.d/00recommends && \ + DEBIAN_FRONTEND="noninteractive" apt-mark hold sensible-utils && \ DEBIAN_FRONTEND="noninteractive" apt-get -y update && \ DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \ DEBIAN_FRONTEND="noninteractive" apt-get -y install \ + wget ca-certificates \ libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl \ libdbd-pg-perl libdbi-perl libdatetime-perl \ libdatetime-format-strptime-perl libdigest-md5-perl \ @@ -25,9 +32,12 @@ RUN echo "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";" texlive-xetex \ starman \ libopenoffice-oodoc-perl \ - postgresql-client \ ssmtp \ lsb-release \ + && echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ + && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ + && DEBIAN_FRONTEND="noninteractive" apt-get -y update \ + && DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client \ && DEBIAN_FRONTEND="noninteractive" apt-get -y autoremove \ && DEBIAN_FRONTEND="noninteractive" apt-get -y autoclean \ && rm -rf /var/lib/apt/lists/*