diff --git a/9.2/alpine/docker-entrypoint.sh b/9.2/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.2/alpine/docker-entrypoint.sh +++ b/9.2/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.3/alpine/docker-entrypoint.sh b/9.3/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.3/alpine/docker-entrypoint.sh +++ b/9.3/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.4/alpine/docker-entrypoint.sh b/9.4/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.4/alpine/docker-entrypoint.sh +++ b/9.4/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.5/alpine/docker-entrypoint.sh b/9.5/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.5/alpine/docker-entrypoint.sh +++ b/9.5/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.6/alpine/docker-entrypoint.sh b/9.6/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.6/alpine/docker-entrypoint.sh +++ b/9.6/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS"