From 716f26cdd6769859f6dd7efd5c17a8ecd519d599 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 18 Mar 2016 13:30:56 -0700 Subject: [PATCH] Listen on "local" interfaces during init --- 9.1/docker-entrypoint.sh | 4 ++-- 9.2/docker-entrypoint.sh | 4 ++-- 9.3/docker-entrypoint.sh | 4 ++-- 9.4/docker-entrypoint.sh | 4 ++-- 9.5/docker-entrypoint.sh | 4 ++-- docker-entrypoint.sh | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index 22ecdec9b4..3b436e4adf 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" # internal start of server in order to allow set-up using psql-client - # does not listen on TCP/IP and waits until start finishes + # does not listen on external TCP/IP and waits until start finishes gosu postgres pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses=''" \ + -o "-c listen_addresses='localhost'" \ -w start : ${POSTGRES_USER:=postgres} diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 22ecdec9b4..3b436e4adf 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" # internal start of server in order to allow set-up using psql-client - # does not listen on TCP/IP and waits until start finishes + # does not listen on external TCP/IP and waits until start finishes gosu postgres pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses=''" \ + -o "-c listen_addresses='localhost'" \ -w start : ${POSTGRES_USER:=postgres} diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 22ecdec9b4..3b436e4adf 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" # internal start of server in order to allow set-up using psql-client - # does not listen on TCP/IP and waits until start finishes + # does not listen on external TCP/IP and waits until start finishes gosu postgres pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses=''" \ + -o "-c listen_addresses='localhost'" \ -w start : ${POSTGRES_USER:=postgres} diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 22ecdec9b4..3b436e4adf 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" # internal start of server in order to allow set-up using psql-client - # does not listen on TCP/IP and waits until start finishes + # does not listen on external TCP/IP and waits until start finishes gosu postgres pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses=''" \ + -o "-c listen_addresses='localhost'" \ -w start : ${POSTGRES_USER:=postgres} diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 22ecdec9b4..3b436e4adf 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" # internal start of server in order to allow set-up using psql-client - # does not listen on TCP/IP and waits until start finishes + # does not listen on external TCP/IP and waits until start finishes gosu postgres pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses=''" \ + -o "-c listen_addresses='localhost'" \ -w start : ${POSTGRES_USER:=postgres} diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 22ecdec9b4..3b436e4adf 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" # internal start of server in order to allow set-up using psql-client - # does not listen on TCP/IP and waits until start finishes + # does not listen on external TCP/IP and waits until start finishes gosu postgres pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses=''" \ + -o "-c listen_addresses='localhost'" \ -w start : ${POSTGRES_USER:=postgres}