Skip to content

Commit dccb05d

Browse files
committed
Merge pull request docker-library#136 from infosiftr/init-localhost
Listen on "local" interfaces during init
2 parents 057673e + 716f26c commit dccb05d

6 files changed

+12
-12
lines changed

9.1/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then
4545
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
4646

4747
# internal start of server in order to allow set-up using psql-client
48-
# does not listen on TCP/IP and waits until start finishes
48+
# does not listen on external TCP/IP and waits until start finishes
4949
gosu postgres pg_ctl -D "$PGDATA" \
50-
-o "-c listen_addresses=''" \
50+
-o "-c listen_addresses='localhost'" \
5151
-w start
5252

5353
: ${POSTGRES_USER:=postgres}

9.2/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then
4545
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
4646

4747
# internal start of server in order to allow set-up using psql-client
48-
# does not listen on TCP/IP and waits until start finishes
48+
# does not listen on external TCP/IP and waits until start finishes
4949
gosu postgres pg_ctl -D "$PGDATA" \
50-
-o "-c listen_addresses=''" \
50+
-o "-c listen_addresses='localhost'" \
5151
-w start
5252

5353
: ${POSTGRES_USER:=postgres}

9.3/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then
4545
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
4646

4747
# internal start of server in order to allow set-up using psql-client
48-
# does not listen on TCP/IP and waits until start finishes
48+
# does not listen on external TCP/IP and waits until start finishes
4949
gosu postgres pg_ctl -D "$PGDATA" \
50-
-o "-c listen_addresses=''" \
50+
-o "-c listen_addresses='localhost'" \
5151
-w start
5252

5353
: ${POSTGRES_USER:=postgres}

9.4/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then
4545
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
4646

4747
# internal start of server in order to allow set-up using psql-client
48-
# does not listen on TCP/IP and waits until start finishes
48+
# does not listen on external TCP/IP and waits until start finishes
4949
gosu postgres pg_ctl -D "$PGDATA" \
50-
-o "-c listen_addresses=''" \
50+
-o "-c listen_addresses='localhost'" \
5151
-w start
5252

5353
: ${POSTGRES_USER:=postgres}

9.5/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then
4545
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
4646

4747
# internal start of server in order to allow set-up using psql-client
48-
# does not listen on TCP/IP and waits until start finishes
48+
# does not listen on external TCP/IP and waits until start finishes
4949
gosu postgres pg_ctl -D "$PGDATA" \
50-
-o "-c listen_addresses=''" \
50+
-o "-c listen_addresses='localhost'" \
5151
-w start
5252

5353
: ${POSTGRES_USER:=postgres}

docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if [ "$1" = 'postgres' ]; then
4545
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
4646

4747
# internal start of server in order to allow set-up using psql-client
48-
# does not listen on TCP/IP and waits until start finishes
48+
# does not listen on external TCP/IP and waits until start finishes
4949
gosu postgres pg_ctl -D "$PGDATA" \
50-
-o "-c listen_addresses=''" \
50+
-o "-c listen_addresses='localhost'" \
5151
-w start
5252

5353
: ${POSTGRES_USER:=postgres}

0 commit comments

Comments
 (0)