From d06f52fde7ed2f342109929c807076ab62a5dce7 Mon Sep 17 00:00:00 2001 From: Mihai Balint Date: Mon, 11 Sep 2017 00:44:05 +0300 Subject: [PATCH 1/4] Install 9.6 with debian stretch. Also include python for later use. --- 9.6/Dockerfile | 14 ++++++++++---- 9.6/docker-entrypoint.sh | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index c20ea32804..e0cf75b760 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:jessie +FROM debian:stretch RUN set -ex; \ if ! command -v gpg > /dev/null; then \ @@ -26,7 +26,7 @@ RUN set -x \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget + && apt-get purge -y --auto-remove ca-certificates # make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \ @@ -55,13 +55,13 @@ RUN set -ex; \ case "$dpkgArch" in \ amd64|i386|ppc64el) \ # arches officialy built by upstream - echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ + echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ apt-get update; \ ;; \ *) \ # we're on an architecture upstream doesn't officially build for # let's build binaries from their published source packages - echo "deb-src http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ + echo "deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ @@ -103,7 +103,13 @@ RUN set -ex; \ sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf; \ apt-get install -y \ "postgresql-$PG_MAJOR=$PG_VERSION" \ + "postgresql-client-$PG_MAJOR=$PG_VERSION" \ "postgresql-contrib-$PG_MAJOR=$PG_VERSION" \ + "postgresql-server-dev-$PG_MAJOR=$PG_VERSION" \ + "postgresql-$PG_MAJOR-repmgr" \ + "barman-cli" \ + "python-setuptools" "python3" "python3-setuptools" "libmagickwand-dev" \ + "rsync" "openssh-client" \ ; \ \ rm -rf /var/lib/apt/lists/*; \ diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index c96fea538d..31227fb90a 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -73,7 +73,7 @@ if [ "$1" = 'postgres' ]; then WARNING: No password has been set for the database. This will allow anyone with access to the Postgres port to access your database. In - Docker's default configuration, this is + Docker''s default configuration, this is effectively any other container on the same system. From f52cc635b4229b7b15abc859310f4ef815952931 Mon Sep 17 00:00:00 2001 From: Mihai Balint Date: Mon, 11 Sep 2017 00:57:25 +0300 Subject: [PATCH 2/4] Bump to latest build from official upstream (9.6.5-1.pgdg90+1) --- 9.6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index e0cf75b760..be260bab56 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -47,7 +47,7 @@ RUN set -ex; \ apt-key list ENV PG_MAJOR 9.6 -ENV PG_VERSION 9.6.5-1.pgdg80+1 +ENV PG_VERSION 9.6.5-1.pgdg90+1 RUN set -ex; \ \ From d08bc494d9b10ba124d25f05439036f28c781c41 Mon Sep 17 00:00:00 2001 From: Mihai Balint Date: Mon, 11 Sep 2017 01:32:13 +0300 Subject: [PATCH 3/4] Upgrade dist packages --- 9.6/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index be260bab56..edab6d3fa3 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -8,6 +8,7 @@ RUN set -ex; \ gnupg2 \ dirmngr \ ; \ + apt-get install dist-upgrade -y --no-install-recommends; \ rm -rf /var/lib/apt/lists/*; \ fi From 071acf5b56aff86275ccb6ee555cb492103dc43d Mon Sep 17 00:00:00 2001 From: Mihai Balint Date: Mon, 11 Sep 2017 01:34:09 +0300 Subject: [PATCH 4/4] Fix copy-paste error --- 9.6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.6/Dockerfile b/9.6/Dockerfile index edab6d3fa3..de1ad5a7d6 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -8,7 +8,7 @@ RUN set -ex; \ gnupg2 \ dirmngr \ ; \ - apt-get install dist-upgrade -y --no-install-recommends; \ + apt-get dist-upgrade -y --no-install-recommends; \ rm -rf /var/lib/apt/lists/*; \ fi