From 812260a7c6e7fb287406ff5866f04f3267d1a4aa Mon Sep 17 00:00:00 2001 From: Paulino Padial Date: Tue, 23 Jan 2018 19:21:31 +0100 Subject: [PATCH] Fixing missing dependencies and permissions to .pgpass file --- Dockerfile | 2 +- autopostgresqlbackup.conf | 2 +- docker-entrypoint.sh | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 401e83d..526d119 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ENV LOG_LEVEL=8 # Packages installation RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y autopostgresqlbackup cron bzip2 gzip && \ + apt-get install -y autopostgresqlbackup cron bzip2 gzip postgresql-client && \ apt-get purge -y --auto-remove && \ rm -rf /var/lib/apt/lists/* diff --git a/autopostgresqlbackup.conf b/autopostgresqlbackup.conf index 52c2c8d..4fc3805 100644 --- a/autopostgresqlbackup.conf +++ b/autopostgresqlbackup.conf @@ -58,7 +58,7 @@ MAILADDR="root" #============================================================= # List of DBBNAMES for Monthly Backups. -MDBNAMES="template1 $DBNAMES" +MDBNAMES="${DBNAMES}" # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes) DBEXCLUDE="${DBEXCLUDE}" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5833c7f..933edae 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -47,6 +47,8 @@ cat <<-EOF > ${HOME}/.pgpass ${DBHOST:-localhost}:*:*:${USERNAME:-postgres}:${PASSPHRASE} EOF +# Permissions for this file shoudl be set to 0600 +chmod +x 0600 ${HOME}/.pgpass # Execute cron with parameters (autopostgresql script is under /etc/cron.daily) echo "Execute cron service..."