Skip to content

Commit 057673e

Browse files
committed
Merge pull request docker-library#132 from knickers/master
Add POSTGRES_INITDB_ARGS env var
2 parents 48d6cd0 + 3f8e978 commit 057673e

6 files changed

+6
-6
lines changed

9.1/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515

1616
# look specifically for PG_VERSION, as it is expected in the DB dir
1717
if [ ! -s "$PGDATA/PG_VERSION" ]; then
18-
gosu postgres initdb
18+
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
1919

2020
# check password first so we can output the warning before postgres
2121
# messes it up

9.2/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515

1616
# look specifically for PG_VERSION, as it is expected in the DB dir
1717
if [ ! -s "$PGDATA/PG_VERSION" ]; then
18-
gosu postgres initdb
18+
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
1919

2020
# check password first so we can output the warning before postgres
2121
# messes it up

9.3/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515

1616
# look specifically for PG_VERSION, as it is expected in the DB dir
1717
if [ ! -s "$PGDATA/PG_VERSION" ]; then
18-
gosu postgres initdb
18+
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
1919

2020
# check password first so we can output the warning before postgres
2121
# messes it up

9.4/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515

1616
# look specifically for PG_VERSION, as it is expected in the DB dir
1717
if [ ! -s "$PGDATA/PG_VERSION" ]; then
18-
gosu postgres initdb
18+
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
1919

2020
# check password first so we can output the warning before postgres
2121
# messes it up

9.5/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515

1616
# look specifically for PG_VERSION, as it is expected in the DB dir
1717
if [ ! -s "$PGDATA/PG_VERSION" ]; then
18-
gosu postgres initdb
18+
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
1919

2020
# check password first so we can output the warning before postgres
2121
# messes it up

docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515

1616
# look specifically for PG_VERSION, as it is expected in the DB dir
1717
if [ ! -s "$PGDATA/PG_VERSION" ]; then
18-
gosu postgres initdb
18+
eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
1919

2020
# check password first so we can output the warning before postgres
2121
# messes it up

0 commit comments

Comments
 (0)